proxy -> cache -> store
service api design
service CallProxy
{
rpc GetName(NameReq) returns(NameResp);
rpc GetDataFromCache(DataModel) returns(DataModel);
rpc GetDataFromStore(DataModel) returns(DataModel);
rpc SetDataToCache(DataModel) returns(DataModel);
rpc SetDataToStore(DataModel) returns(DataModel);
// get from cache, if cache null, continue get store
rpc GetData(DataModel) returns(DataModel);
// delete cache, update store
rpc SetData(DataModel) returns(DataModel);
}
service CallCache
{
rpc GetName(NameReq) returns(NameResp);
rpc GetData(DataModel) returns(DataModel);
rpc GetDataTrace(DataModel) returns(DataModel);
rpc SetData(DataModel) returns(DataModel);
rpc DeleteData(DataModel) returns(DataModel);
}
service CallStore
{
rpc GetName(NameReq) returns(NameResp);
rpc GetData(DataModel) returns(DataModel);
rpc SetData(DataModel) returns(DataModel);
rpc DeleteData(DataModel) returns(DataModel);
}
go get github.com/mattn/goreman
- protoc
make gen
- build golang file
make build
- run proxy/cache/store
make run
- use client to test
./bin/client -debug=true
- docker build
make docker-build
- apply istio
to do
- client test
to do