dictionary

package
v0.0.0-...-b667810 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 DictionaryService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "dictionary.DictionaryService",
	HandlerType: (*DictionaryServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Put",
			Handler:    _DictionaryService_Put_Handler,
		},
		{
			MethodName: "Get",
			Handler:    _DictionaryService_Get_Handler,
		},
		{
			MethodName: "GetLeader",
			Handler:    _DictionaryService_GetLeader_Handler,
		},
		{
			MethodName: "GetReplicas",
			Handler:    _DictionaryService_GetReplicas_Handler,
		},
		{
			MethodName: "HeartBeat",
			Handler:    _DictionaryService_HeartBeat_Handler,
		},
		{
			MethodName: "Join",
			Handler:    _DictionaryService_Join_Handler,
		},
		{
			MethodName: "SendReplicas",
			Handler:    _DictionaryService_SendReplicas_Handler,
		},
		{
			MethodName: "SendValue",
			Handler:    _DictionaryService_SendValue_Handler,
		},
		{
			MethodName: "SendValues",
			Handler:    _DictionaryService_SendValues_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "Dictionary/dictionary.proto",
}

DictionaryService_ServiceDesc is the grpc.ServiceDesc for DictionaryService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_Dictionary_dictionary_proto protoreflect.FileDescriptor

Functions

func RegisterDictionaryServiceServer

func RegisterDictionaryServiceServer(s grpc.ServiceRegistrar, srv DictionaryServiceServer)

Types

type DictionaryServiceClient

type DictionaryServiceClient interface {
	// Client methods.
	Put(ctx context.Context, in *PutMessage, opts ...grpc.CallOption) (*SuccessMessage, error)
	Get(ctx context.Context, in *GetMessage, opts ...grpc.CallOption) (*ValueMessage, error)
	// Client and Replica methods.
	GetLeader(ctx context.Context, in *VoidMessage, opts ...grpc.CallOption) (*LeaderMessage, error)
	GetReplicas(ctx context.Context, in *VoidMessage, opts ...grpc.CallOption) (*ReplicaListMessage, error)
	// Replica methods.
	HeartBeat(ctx context.Context, in *VoidMessage, opts ...grpc.CallOption) (*VoidMessage, error)
	// Sub-replica methods.
	Join(ctx context.Context, in *IpMessage, opts ...grpc.CallOption) (*VoidMessage, error)
	// Leader-replica methods.
	SendReplicas(ctx context.Context, in *ReplicaListMessage, opts ...grpc.CallOption) (*VoidMessage, error)
	SendValue(ctx context.Context, in *PutMessage, opts ...grpc.CallOption) (*VoidMessage, error)
	SendValues(ctx context.Context, in *PutAllMessage, opts ...grpc.CallOption) (*VoidMessage, error)
}

DictionaryServiceClient is the client API for DictionaryService 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.

type DictionaryServiceServer

type DictionaryServiceServer interface {
	// Client methods.
	Put(context.Context, *PutMessage) (*SuccessMessage, error)
	Get(context.Context, *GetMessage) (*ValueMessage, error)
	// Client and Replica methods.
	GetLeader(context.Context, *VoidMessage) (*LeaderMessage, error)
	GetReplicas(context.Context, *VoidMessage) (*ReplicaListMessage, error)
	// Replica methods.
	HeartBeat(context.Context, *VoidMessage) (*VoidMessage, error)
	// Sub-replica methods.
	Join(context.Context, *IpMessage) (*VoidMessage, error)
	// Leader-replica methods.
	SendReplicas(context.Context, *ReplicaListMessage) (*VoidMessage, error)
	SendValue(context.Context, *PutMessage) (*VoidMessage, error)
	SendValues(context.Context, *PutAllMessage) (*VoidMessage, error)
	// contains filtered or unexported methods
}

DictionaryServiceServer is the server API for DictionaryService service. All implementations must embed UnimplementedDictionaryServiceServer for forward compatibility

type GetMessage

type GetMessage struct {
	Key int32 `protobuf:"varint,1,opt,name=key,proto3" json:"key,omitempty"`
	// contains filtered or unexported fields
}

func (*GetMessage) Descriptor deprecated

func (*GetMessage) Descriptor() ([]byte, []int)

Deprecated: Use GetMessage.ProtoReflect.Descriptor instead.

func (*GetMessage) GetKey

func (x *GetMessage) GetKey() int32

func (*GetMessage) ProtoMessage

func (*GetMessage) ProtoMessage()

func (*GetMessage) ProtoReflect

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

func (*GetMessage) Reset

func (x *GetMessage) Reset()

func (*GetMessage) String

func (x *GetMessage) String() string

type ImpermissibleError

type ImpermissibleError struct{}

func (*ImpermissibleError) Error

func (i *ImpermissibleError) Error() string

type IpMessage

type IpMessage struct {
	Ip string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"`
	// contains filtered or unexported fields
}

func (*IpMessage) Descriptor deprecated

func (*IpMessage) Descriptor() ([]byte, []int)

Deprecated: Use IpMessage.ProtoReflect.Descriptor instead.

func (*IpMessage) GetIp

func (x *IpMessage) GetIp() string

func (*IpMessage) ProtoMessage

func (*IpMessage) ProtoMessage()

func (*IpMessage) ProtoReflect

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

func (*IpMessage) Reset

func (x *IpMessage) Reset()

func (*IpMessage) String

func (x *IpMessage) String() string

type LeaderMessage

type LeaderMessage struct {
	Ip       string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"`
	IsLeader bool   `protobuf:"varint,2,opt,name=isLeader,proto3" json:"isLeader,omitempty"`
	// contains filtered or unexported fields
}

func (*LeaderMessage) Descriptor deprecated

func (*LeaderMessage) Descriptor() ([]byte, []int)

Deprecated: Use LeaderMessage.ProtoReflect.Descriptor instead.

func (*LeaderMessage) GetIp

func (x *LeaderMessage) GetIp() string

func (*LeaderMessage) GetIsLeader

func (x *LeaderMessage) GetIsLeader() bool

func (*LeaderMessage) ProtoMessage

func (*LeaderMessage) ProtoMessage()

func (*LeaderMessage) ProtoReflect

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

func (*LeaderMessage) Reset

func (x *LeaderMessage) Reset()

func (*LeaderMessage) String

func (x *LeaderMessage) String() string

type PutAllMessage

type PutAllMessage struct {
	Values []*PutMessage `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"`
	// contains filtered or unexported fields
}

func (*PutAllMessage) Descriptor deprecated

func (*PutAllMessage) Descriptor() ([]byte, []int)

Deprecated: Use PutAllMessage.ProtoReflect.Descriptor instead.

func (*PutAllMessage) GetValues

func (x *PutAllMessage) GetValues() []*PutMessage

func (*PutAllMessage) ProtoMessage

func (*PutAllMessage) ProtoMessage()

func (*PutAllMessage) ProtoReflect

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

func (*PutAllMessage) Reset

func (x *PutAllMessage) Reset()

func (*PutAllMessage) String

func (x *PutAllMessage) String() string

type PutMessage

type PutMessage struct {
	Key   int32 `protobuf:"varint,1,opt,name=key,proto3" json:"key,omitempty"`
	Value int32 `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*PutMessage) Descriptor deprecated

func (*PutMessage) Descriptor() ([]byte, []int)

Deprecated: Use PutMessage.ProtoReflect.Descriptor instead.

func (*PutMessage) GetKey

func (x *PutMessage) GetKey() int32

func (*PutMessage) GetValue

func (x *PutMessage) GetValue() int32

func (*PutMessage) ProtoMessage

func (*PutMessage) ProtoMessage()

func (*PutMessage) ProtoReflect

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

func (*PutMessage) Reset

func (x *PutMessage) Reset()

func (*PutMessage) String

func (x *PutMessage) String() string

type ReplicaListMessage

type ReplicaListMessage struct {
	Ips []string `protobuf:"bytes,1,rep,name=ips,proto3" json:"ips,omitempty"`
	// contains filtered or unexported fields
}

func (*ReplicaListMessage) Descriptor deprecated

func (*ReplicaListMessage) Descriptor() ([]byte, []int)

Deprecated: Use ReplicaListMessage.ProtoReflect.Descriptor instead.

func (*ReplicaListMessage) GetIps

func (x *ReplicaListMessage) GetIps() []string

func (*ReplicaListMessage) ProtoMessage

func (*ReplicaListMessage) ProtoMessage()

func (*ReplicaListMessage) ProtoReflect

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

func (*ReplicaListMessage) Reset

func (x *ReplicaListMessage) Reset()

func (*ReplicaListMessage) String

func (x *ReplicaListMessage) String() string

type SuccessMessage

type SuccessMessage struct {
	Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	// contains filtered or unexported fields
}

func (*SuccessMessage) Descriptor deprecated

func (*SuccessMessage) Descriptor() ([]byte, []int)

Deprecated: Use SuccessMessage.ProtoReflect.Descriptor instead.

func (*SuccessMessage) GetSuccess

func (x *SuccessMessage) GetSuccess() bool

func (*SuccessMessage) ProtoMessage

func (*SuccessMessage) ProtoMessage()

func (*SuccessMessage) ProtoReflect

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

func (*SuccessMessage) Reset

func (x *SuccessMessage) Reset()

func (*SuccessMessage) String

func (x *SuccessMessage) String() string

type UnimplementedDictionaryServiceServer

type UnimplementedDictionaryServiceServer struct {
}

UnimplementedDictionaryServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedDictionaryServiceServer) Get

func (UnimplementedDictionaryServiceServer) GetLeader

func (UnimplementedDictionaryServiceServer) GetReplicas

func (UnimplementedDictionaryServiceServer) HeartBeat

func (UnimplementedDictionaryServiceServer) Join

func (UnimplementedDictionaryServiceServer) Put

func (UnimplementedDictionaryServiceServer) SendReplicas

func (UnimplementedDictionaryServiceServer) SendValue

func (UnimplementedDictionaryServiceServer) SendValues

type UnsafeDictionaryServiceServer

type UnsafeDictionaryServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeDictionaryServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DictionaryServiceServer will result in compilation errors.

type ValueMessage

type ValueMessage struct {
	Value int32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*ValueMessage) Descriptor deprecated

func (*ValueMessage) Descriptor() ([]byte, []int)

Deprecated: Use ValueMessage.ProtoReflect.Descriptor instead.

func (*ValueMessage) GetValue

func (x *ValueMessage) GetValue() int32

func (*ValueMessage) ProtoMessage

func (*ValueMessage) ProtoMessage()

func (*ValueMessage) ProtoReflect

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

func (*ValueMessage) Reset

func (x *ValueMessage) Reset()

func (*ValueMessage) String

func (x *ValueMessage) String() string

type VoidMessage

type VoidMessage struct {
	// contains filtered or unexported fields
}

func (*VoidMessage) Descriptor deprecated

func (*VoidMessage) Descriptor() ([]byte, []int)

Deprecated: Use VoidMessage.ProtoReflect.Descriptor instead.

func (*VoidMessage) ProtoMessage

func (*VoidMessage) ProtoMessage()

func (*VoidMessage) ProtoReflect

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

func (*VoidMessage) Reset

func (x *VoidMessage) Reset()

func (*VoidMessage) String

func (x *VoidMessage) String() string

Jump to

Keyboard shortcuts

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