Documentation ¶
Index ¶
Constants ¶
const ( CacheService_Get_FullMethodName = "/api.CacheService/Get" CacheService_Put_FullMethodName = "/api.CacheService/Put" )
Variables ¶
var CacheService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.CacheService", HandlerType: (*CacheServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Get", Handler: _CacheService_Get_Handler, }, { MethodName: "Put", Handler: _CacheService_Put_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "cache.proto", }
CacheService_ServiceDesc is the grpc.ServiceDesc for CacheService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_cache_proto protoreflect.FileDescriptor
Functions ¶
func RegisterCacheServiceServer ¶
func RegisterCacheServiceServer(s grpc.ServiceRegistrar, srv CacheServiceServer)
Types ¶
type CacheServiceClient ¶
type CacheServiceClient interface { Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) Put(ctx context.Context, in *PutRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) }
CacheServiceClient is the client API for CacheService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewCacheServiceClient ¶
func NewCacheServiceClient(cc grpc.ClientConnInterface) CacheServiceClient
type CacheServiceServer ¶
type CacheServiceServer interface { Get(context.Context, *GetRequest) (*GetResponse, error) Put(context.Context, *PutRequest) (*emptypb.Empty, error) // contains filtered or unexported methods }
CacheServiceServer is the server API for CacheService service. All implementations must embed UnimplementedCacheServiceServer for forward compatibility
type GetRequest ¶
type GetRequest struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // contains filtered or unexported fields }
func (*GetRequest) Descriptor
deprecated
func (*GetRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.
func (*GetRequest) GetKey ¶
func (x *GetRequest) GetKey() string
func (*GetRequest) ProtoMessage ¶
func (*GetRequest) ProtoMessage()
func (*GetRequest) ProtoReflect ¶
func (x *GetRequest) ProtoReflect() protoreflect.Message
func (*GetRequest) Reset ¶
func (x *GetRequest) Reset()
func (*GetRequest) String ¶
func (x *GetRequest) String() string
type GetResponse ¶
type GetResponse struct { Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*GetResponse) Descriptor
deprecated
func (*GetResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetResponse.ProtoReflect.Descriptor instead.
func (*GetResponse) GetValue ¶
func (x *GetResponse) GetValue() string
func (*GetResponse) ProtoMessage ¶
func (*GetResponse) ProtoMessage()
func (*GetResponse) ProtoReflect ¶
func (x *GetResponse) ProtoReflect() protoreflect.Message
func (*GetResponse) Reset ¶
func (x *GetResponse) Reset()
func (*GetResponse) String ¶
func (x *GetResponse) String() string
type PutRequest ¶
type PutRequest struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*PutRequest) Descriptor
deprecated
func (*PutRequest) Descriptor() ([]byte, []int)
Deprecated: Use PutRequest.ProtoReflect.Descriptor instead.
func (*PutRequest) GetKey ¶
func (x *PutRequest) GetKey() string
func (*PutRequest) GetValue ¶
func (x *PutRequest) GetValue() string
func (*PutRequest) ProtoMessage ¶
func (*PutRequest) ProtoMessage()
func (*PutRequest) ProtoReflect ¶
func (x *PutRequest) ProtoReflect() protoreflect.Message
func (*PutRequest) Reset ¶
func (x *PutRequest) Reset()
func (*PutRequest) String ¶
func (x *PutRequest) String() string
type UnimplementedCacheServiceServer ¶
type UnimplementedCacheServiceServer struct { }
UnimplementedCacheServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedCacheServiceServer) Get ¶
func (UnimplementedCacheServiceServer) Get(context.Context, *GetRequest) (*GetResponse, error)
func (UnimplementedCacheServiceServer) Put ¶
func (UnimplementedCacheServiceServer) Put(context.Context, *PutRequest) (*emptypb.Empty, error)
type UnsafeCacheServiceServer ¶
type UnsafeCacheServiceServer interface {
// contains filtered or unexported methods
}
UnsafeCacheServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CacheServiceServer will result in compilation errors.