Documentation
¶
Index ¶
Constants ¶
const ( Zap_Get_FullMethodName = "/zapProto.Zap/Get" Zap_Put_FullMethodName = "/zapProto.Zap/Put" )
Variables ¶
var File_zap_proto protoreflect.FileDescriptor
var Zap_ServiceDesc = grpc.ServiceDesc{ ServiceName: "zapProto.Zap", HandlerType: (*ZapServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Get", Handler: _Zap_Get_Handler, }, { MethodName: "Put", Handler: _Zap_Put_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "zap.proto", }
Zap_ServiceDesc is the grpc.ServiceDesc for Zap service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterZapServer ¶
func RegisterZapServer(s grpc.ServiceRegistrar, srv ZapServer)
Types ¶
type Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
func (*Empty) Descriptor
deprecated
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
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 []byte `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() []byte
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 []byte `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() []byte
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 UnimplementedZapServer ¶
type UnimplementedZapServer struct { }
UnimplementedZapServer must be embedded to have forward compatible implementations.
func (UnimplementedZapServer) Get ¶
func (UnimplementedZapServer) Get(context.Context, *GetRequest) (*GetResponse, error)
func (UnimplementedZapServer) Put ¶
func (UnimplementedZapServer) Put(context.Context, *PutRequest) (*Empty, error)
type UnsafeZapServer ¶
type UnsafeZapServer interface {
// contains filtered or unexported methods
}
UnsafeZapServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ZapServer will result in compilation errors.
type ZapClient ¶
type ZapClient interface { Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) Put(ctx context.Context, in *PutRequest, opts ...grpc.CallOption) (*Empty, error) }
ZapClient is the client API for Zap 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 NewZapClient ¶
func NewZapClient(cc grpc.ClientConnInterface) ZapClient
type ZapServer ¶
type ZapServer interface { Get(context.Context, *GetRequest) (*GetResponse, error) Put(context.Context, *PutRequest) (*Empty, error) // contains filtered or unexported methods }
ZapServer is the server API for Zap service. All implementations must embed UnimplementedZapServer for forward compatibility