Documentation ¶
Index ¶
Constants ¶
const ( Serve_Put_FullMethodName = "/serve.Serve/Put" Serve_Get_FullMethodName = "/serve.Serve/Get" )
Variables ¶
var File_serve_proto protoreflect.FileDescriptor
var Serve_ServiceDesc = grpc.ServiceDesc{ ServiceName: "serve.Serve", HandlerType: (*ServeServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Put", Handler: _Serve_Put_Handler, }, { MethodName: "Get", Handler: _Serve_Get_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "serve.proto", }
Serve_ServiceDesc is the grpc.ServiceDesc for Serve service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterServeServer ¶
func RegisterServeServer(s grpc.ServiceRegistrar, srv ServeServer)
Types ¶
type Key ¶
type Key struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // contains filtered or unexported fields }
func (*Key) Descriptor
deprecated
func (*Key) ProtoMessage ¶
func (*Key) ProtoMessage()
func (*Key) ProtoReflect ¶
func (x *Key) ProtoReflect() protoreflect.Message
type Nil ¶
type Nil struct {
// contains filtered or unexported fields
}
func (*Nil) Descriptor
deprecated
func (*Nil) ProtoMessage ¶
func (*Nil) ProtoMessage()
func (*Nil) ProtoReflect ¶
func (x *Nil) ProtoReflect() protoreflect.Message
type Pair ¶
type Pair 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 (*Pair) Descriptor
deprecated
func (*Pair) ProtoMessage ¶
func (*Pair) ProtoMessage()
func (*Pair) ProtoReflect ¶
func (x *Pair) ProtoReflect() protoreflect.Message
type ServeClient ¶
type ServeClient interface { Put(ctx context.Context, in *Pair, opts ...grpc.CallOption) (*Nil, error) Get(ctx context.Context, in *Key, opts ...grpc.CallOption) (*Value, error) }
ServeClient is the client API for Serve 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 NewServeClient ¶
func NewServeClient(cc grpc.ClientConnInterface) ServeClient
type ServeServer ¶
type ServeServer interface { Put(context.Context, *Pair) (*Nil, error) Get(context.Context, *Key) (*Value, error) // contains filtered or unexported methods }
ServeServer is the server API for Serve service. All implementations must embed UnimplementedServeServer for forward compatibility
type UnimplementedServeServer ¶
type UnimplementedServeServer struct { }
UnimplementedServeServer must be embedded to have forward compatible implementations.
type UnsafeServeServer ¶
type UnsafeServeServer interface {
// contains filtered or unexported methods
}
UnsafeServeServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ServeServer will result in compilation errors.
type Value ¶
type Value struct { Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*Value) Descriptor
deprecated
func (*Value) ProtoMessage ¶
func (*Value) ProtoMessage()
func (*Value) ProtoReflect ¶
func (x *Value) ProtoReflect() protoreflect.Message