proto

package
v0.0.0-...-f19b61d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 5, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_proto_proto protoreflect.FileDescriptor
View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use GetValue.ProtoReflect.Descriptor instead.

func (*GetValue) GetKey

func (x *GetValue) GetKey() int64

func (*GetValue) ProtoMessage

func (*GetValue) ProtoMessage()

func (*GetValue) ProtoReflect

func (x *GetValue) ProtoReflect() protoreflect.Message

func (*GetValue) Reset

func (x *GetValue) Reset()

func (*GetValue) String

func (x *GetValue) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Keyvalue.ProtoReflect.Descriptor instead.

func (*Keyvalue) GetKey

func (x *Keyvalue) GetKey() int64

func (*Keyvalue) GetValue

func (x *Keyvalue) GetValue() int64

func (*Keyvalue) ProtoMessage

func (*Keyvalue) ProtoMessage()

func (*Keyvalue) ProtoReflect

func (x *Keyvalue) ProtoReflect() protoreflect.Message

func (*Keyvalue) Reset

func (x *Keyvalue) Reset()

func (*Keyvalue) String

func (x *Keyvalue) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Result.ProtoReflect.Descriptor instead.

func (*Result) GetResult

func (x *Result) GetResult() bool

func (*Result) ProtoMessage

func (*Result) ProtoMessage()

func (*Result) ProtoReflect

func (x *Result) ProtoReflect() protoreflect.Message

func (*Result) Reset

func (x *Result) Reset()

func (*Result) String

func (x *Result) String() string

type UnimplementedHashtableServer

type UnimplementedHashtableServer struct {
}

UnimplementedHashtableServer must be embedded to have forward compatible implementations.

func (UnimplementedHashtableServer) Get

func (UnimplementedHashtableServer) Put

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL