Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var File_cache_cache_proto protoreflect.FileDescriptor
View Source
var File_cache_cache_service_proto protoreflect.FileDescriptor
Functions ¶
func RegisterCacheServiceServer ¶
func RegisterCacheServiceServer(s *grpc.Server, srv CacheServiceServer)
Types ¶
type CacheServiceClient ¶
type CacheServiceClient interface { Get(ctx context.Context, in *GetReq, opts ...grpc.CallOption) (*GetResp, error) Put(ctx context.Context, in *PutReq, opts ...grpc.CallOption) (*PutResp, error) }
CacheServiceClient is the client API for CacheService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewCacheServiceClient ¶
func NewCacheServiceClient(cc grpc.ClientConnInterface) CacheServiceClient
type CacheServiceServer ¶
type CacheServiceServer interface { Get(context.Context, *GetReq) (*GetResp, error) Put(context.Context, *PutReq) (*PutResp, error) }
CacheServiceServer is the server API for CacheService service.
type GetReq ¶
type GetReq struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Fast bool `protobuf:"varint,2,opt,name=fast,proto3" json:"fast,omitempty"` // contains filtered or unexported fields }
func (*GetReq) Descriptor
deprecated
func (*GetReq) ProtoMessage ¶
func (*GetReq) ProtoMessage()
func (*GetReq) ProtoReflect ¶ added in v0.0.12
func (x *GetReq) ProtoReflect() protoreflect.Message
type GetResp ¶
type GetResp struct { Kv *KV `protobuf:"bytes,1,opt,name=kv,proto3" json:"kv,omitempty"` InMemory bool `protobuf:"varint,2,opt,name=in_memory,json=inMemory,proto3" json:"in_memory,omitempty"` // contains filtered or unexported fields }
func (*GetResp) Descriptor
deprecated
func (*GetResp) GetInMemory ¶
func (*GetResp) ProtoMessage ¶
func (*GetResp) ProtoMessage()
func (*GetResp) ProtoReflect ¶ added in v0.0.12
func (x *GetResp) ProtoReflect() protoreflect.Message
type KV ¶
type KV struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*KV) Descriptor
deprecated
func (*KV) ProtoMessage ¶
func (*KV) ProtoMessage()
func (*KV) ProtoReflect ¶ added in v0.0.12
func (x *KV) ProtoReflect() protoreflect.Message
type PutReq ¶
type PutReq struct { Kv *KV `protobuf:"bytes,1,opt,name=kv,proto3" json:"kv,omitempty"` WriteBack bool `protobuf:"varint,2,opt,name=write_back,json=writeBack,proto3" json:"write_back,omitempty"` // contains filtered or unexported fields }
func (*PutReq) Descriptor
deprecated
func (*PutReq) GetWriteBack ¶
func (*PutReq) ProtoMessage ¶
func (*PutReq) ProtoMessage()
func (*PutReq) ProtoReflect ¶ added in v0.0.12
func (x *PutReq) ProtoReflect() protoreflect.Message
type PutResp ¶
type PutResp struct {
// contains filtered or unexported fields
}
func (*PutResp) Descriptor
deprecated
func (*PutResp) ProtoMessage ¶
func (*PutResp) ProtoMessage()
func (*PutResp) ProtoReflect ¶ added in v0.0.12
func (x *PutResp) ProtoReflect() protoreflect.Message
type UnimplementedCacheServiceServer ¶ added in v0.0.5
type UnimplementedCacheServiceServer struct { }
UnimplementedCacheServiceServer can be embedded to have forward compatible implementations.
Click to show internal directories.
Click to hide internal directories.