Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var File_proto_proto_proto protoreflect.FileDescriptor
var Hashtable_ServiceDesc = grpc.ServiceDesc{ ServiceName: "proto.hashtable", HandlerType: (*HashtableServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Put", Handler: _Hashtable_Put_Handler, }, { MethodName: "Get", Handler: _Hashtable_Get_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/proto.proto", }
Hashtable_ServiceDesc is the grpc.ServiceDesc for Hashtable service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterHashtableServer ¶
func RegisterHashtableServer(s grpc.ServiceRegistrar, srv HashtableServer)
Types ¶
type GetValue ¶
type GetValue struct { Key int64 `protobuf:"varint,1,opt,name=key,proto3" json:"key,omitempty"` // contains filtered or unexported fields }
func (*GetValue) Descriptor
deprecated
func (*GetValue) ProtoMessage ¶
func (*GetValue) ProtoMessage()
func (*GetValue) ProtoReflect ¶
func (x *GetValue) ProtoReflect() protoreflect.Message
type HashtableClient ¶
type HashtableClient interface { Put(ctx context.Context, in *Keyvalue, opts ...grpc.CallOption) (*Result, error) Get(ctx context.Context, in *GetValue, opts ...grpc.CallOption) (*GetValue, error) }
HashtableClient is the client API for Hashtable 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 NewHashtableClient ¶
func NewHashtableClient(cc grpc.ClientConnInterface) HashtableClient
type HashtableServer ¶
type HashtableServer interface { Put(context.Context, *Keyvalue) (*Result, error) Get(context.Context, *GetValue) (*GetValue, error) // contains filtered or unexported methods }
HashtableServer is the server API for Hashtable service. All implementations must embed UnimplementedHashtableServer for forward compatibility
type Keyvalue ¶
type Keyvalue struct { Key int64 `protobuf:"varint,1,opt,name=key,proto3" json:"key,omitempty"` Value int64 `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*Keyvalue) Descriptor
deprecated
func (*Keyvalue) ProtoMessage ¶
func (*Keyvalue) ProtoMessage()
func (*Keyvalue) ProtoReflect ¶
func (x *Keyvalue) ProtoReflect() protoreflect.Message
type Result ¶
type Result struct { Result bool `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"` // contains filtered or unexported fields }
func (*Result) Descriptor
deprecated
func (*Result) ProtoMessage ¶
func (*Result) ProtoMessage()
func (*Result) ProtoReflect ¶
func (x *Result) ProtoReflect() protoreflect.Message
type UnimplementedHashtableServer ¶
type UnimplementedHashtableServer struct { }
UnimplementedHashtableServer must be embedded to have forward compatible implementations.
type UnsafeHashtableServer ¶
type UnsafeHashtableServer interface {
// contains filtered or unexported methods
}
UnsafeHashtableServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to HashtableServer will result in compilation errors.