Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var File_pb_proto protoreflect.FileDescriptor
var GroupCache_ServiceDesc = grpc.ServiceDesc{ ServiceName: "pb.GroupCache", HandlerType: (*GroupCacheServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Get", Handler: _GroupCache_Get_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "pb.proto", }
GroupCache_ServiceDesc is the grpc.ServiceDesc for GroupCache service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterGroupCacheServer ¶
func RegisterGroupCacheServer(s grpc.ServiceRegistrar, srv GroupCacheServer)
Types ¶
type GroupCacheClient ¶
type GroupCacheClient interface {
Get(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
}
GroupCacheClient is the client API for GroupCache 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 NewGroupCacheClient ¶
func NewGroupCacheClient(cc grpc.ClientConnInterface) GroupCacheClient
type GroupCacheServer ¶
type GroupCacheServer interface { Get(context.Context, *Request) (*Response, error) // contains filtered or unexported methods }
GroupCacheServer is the server API for GroupCache service. All implementations must embed UnimplementedGroupCacheServer for forward compatibility
type Request ¶
type Request struct { Group string `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"` Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` // contains filtered or unexported fields }
func (*Request) Descriptor
deprecated
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
func (*Request) ProtoReflect ¶
func (x *Request) ProtoReflect() protoreflect.Message
type Response ¶
type Response struct { Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*Response) Descriptor
deprecated
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) ProtoReflect ¶
func (x *Response) ProtoReflect() protoreflect.Message
type UnimplementedGroupCacheServer ¶
type UnimplementedGroupCacheServer struct { }
UnimplementedGroupCacheServer must be embedded to have forward compatible implementations.
type UnsafeGroupCacheServer ¶
type UnsafeGroupCacheServer interface {
// contains filtered or unexported methods
}
UnsafeGroupCacheServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GroupCacheServer will result in compilation errors.