Documentation
¶
Overview ¶
Package distcachepb is a generated protocol buffer package.
It is generated from these files:
distcachepb/distcache.proto
It has these top-level messages:
Request Response
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Status_name = map[int32]string{
0: "Err",
1: "Ok",
}
View Source
var Status_value = map[string]int32{
"Err": 0,
"Ok": 1,
}
View Source
var TrxnType_name = map[int32]string{
0: "GET",
1: "SET",
2: "DELETE",
}
View Source
var TrxnType_value = map[string]int32{
"GET": 0,
"SET": 1,
"DELETE": 2,
}
Functions ¶
func RegisterCacheServer ¶
func RegisterCacheServer(s *grpc.Server, srv CacheServer)
Types ¶
type CacheClient ¶
type CacheClient interface {
Trxn(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
}
func NewCacheClient ¶
func NewCacheClient(cc *grpc.ClientConn) CacheClient
type CacheServer ¶
type Request ¶
type Request struct { Type TrxnType `protobuf:"varint,1,opt,name=type,enum=distcachepb.TrxnType" json:"type,omitempty"` Key string `protobuf:"bytes,2,opt,name=key" json:"key,omitempty"` Value string `protobuf:"bytes,3,opt,name=value" json:"value,omitempty"` }
func (*Request) Descriptor ¶
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
type Response ¶
type Response struct { Status Status `protobuf:"varint,1,opt,name=status,enum=distcachepb.Status" json:"status,omitempty"` Server string `protobuf:"bytes,2,opt,name=server" json:"server,omitempty"` Key string `protobuf:"bytes,3,opt,name=key" json:"key,omitempty"` Value string `protobuf:"bytes,4,opt,name=value" json:"value,omitempty"` }
func (*Response) Descriptor ¶
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
Click to show internal directories.
Click to hide internal directories.