Documentation ¶
Index ¶
- Variables
- func RegisterConsistentHashingServiceServer(s *grpc.Server, srv ConsistentHashingServiceServer)
- type AddNRequest
- type AddNResponse
- type AddRequest
- type AddResponse
- type ConsistentHashingServiceClient
- type ConsistentHashingServiceServer
- type DeleteRequest
- type DeleteResponse
- type Key
- func (*Key) Descriptor() ([]byte, []int)deprecated
- func (x *Key) GetCreateTime() *timestamppb.Timestamp
- func (x *Key) GetName() string
- func (x *Key) GetNodeUuid() string
- func (x *Key) GetUpdateTime() *timestamppb.Timestamp
- func (*Key) ProtoMessage()
- func (x *Key) ProtoReflect() protoreflect.Message
- func (x *Key) Reset()
- func (x *Key) String() string
- type ListRequest
- type ListResponse
- type MapKeyRequest
- type MapKeyResponse
- type Node
- func (*Node) Descriptor() ([]byte, []int)deprecated
- func (x *Node) GetCreateTime() *timestamppb.Timestamp
- func (x *Node) GetExtraInfo() string
- func (x *Node) GetUpdateTime() *timestamppb.Timestamp
- func (x *Node) GetUuid() string
- func (*Node) ProtoMessage()
- func (x *Node) ProtoReflect() protoreflect.Message
- func (x *Node) Reset()
- func (x *Node) String() string
- type OpLogEntry
- func (*OpLogEntry) Descriptor() ([]byte, []int)deprecated
- func (x *OpLogEntry) GetOperationTime() *timestamppb.Timestamp
- func (x *OpLogEntry) GetOperationType() OperationType
- func (x *OpLogEntry) GetPayload() []byte
- func (*OpLogEntry) ProtoMessage()
- func (x *OpLogEntry) ProtoReflect() protoreflect.Message
- func (x *OpLogEntry) Reset()
- func (x *OpLogEntry) String() string
- type OperationType
- func (OperationType) Descriptor() protoreflect.EnumDescriptor
- func (x OperationType) Enum() *OperationType
- func (OperationType) EnumDescriptor() ([]byte, []int)deprecated
- func (x OperationType) Number() protoreflect.EnumNumber
- func (x OperationType) String() string
- func (OperationType) Type() protoreflect.EnumType
- type UnimplementedConsistentHashingServiceServer
- func (*UnimplementedConsistentHashingServiceServer) Add(context.Context, *AddRequest) (*AddResponse, error)
- func (*UnimplementedConsistentHashingServiceServer) AddN(context.Context, *AddNRequest) (*AddNResponse, error)
- func (*UnimplementedConsistentHashingServiceServer) Delete(context.Context, *DeleteRequest) (*DeleteResponse, error)
- func (*UnimplementedConsistentHashingServiceServer) List(context.Context, *ListRequest) (*ListResponse, error)
- func (*UnimplementedConsistentHashingServiceServer) MapKey(context.Context, *MapKeyRequest) (*MapKeyResponse, error)
Constants ¶
This section is empty.
Variables ¶
var ( OperationType_name = map[int32]string{ 0: "OPERATION_TYPE_ADD", 1: "OPERATION_TYPE_REMOVE", } OperationType_value = map[string]int32{ "OPERATION_TYPE_ADD": 0, "OPERATION_TYPE_REMOVE": 1, } )
Enum value maps for OperationType.
var File_consistent_hashing_service_proto protoreflect.FileDescriptor
var File_oplog_proto protoreflect.FileDescriptor
Functions ¶
func RegisterConsistentHashingServiceServer ¶
func RegisterConsistentHashingServiceServer(s *grpc.Server, srv ConsistentHashingServiceServer)
Types ¶
type AddNRequest ¶
type AddNRequest struct { Nodes []*Node `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"` // contains filtered or unexported fields }
func (*AddNRequest) Descriptor
deprecated
func (*AddNRequest) Descriptor() ([]byte, []int)
Deprecated: Use AddNRequest.ProtoReflect.Descriptor instead.
func (*AddNRequest) GetNodes ¶
func (x *AddNRequest) GetNodes() []*Node
func (*AddNRequest) ProtoMessage ¶
func (*AddNRequest) ProtoMessage()
func (*AddNRequest) ProtoReflect ¶
func (x *AddNRequest) ProtoReflect() protoreflect.Message
func (*AddNRequest) Reset ¶
func (x *AddNRequest) Reset()
func (*AddNRequest) String ¶
func (x *AddNRequest) String() string
type AddNResponse ¶
type AddNResponse struct {
// contains filtered or unexported fields
}
func (*AddNResponse) Descriptor
deprecated
func (*AddNResponse) Descriptor() ([]byte, []int)
Deprecated: Use AddNResponse.ProtoReflect.Descriptor instead.
func (*AddNResponse) ProtoMessage ¶
func (*AddNResponse) ProtoMessage()
func (*AddNResponse) ProtoReflect ¶
func (x *AddNResponse) ProtoReflect() protoreflect.Message
func (*AddNResponse) Reset ¶
func (x *AddNResponse) Reset()
func (*AddNResponse) String ¶
func (x *AddNResponse) String() string
type AddRequest ¶
type AddRequest struct { Node *Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` // contains filtered or unexported fields }
---------- request + response ----------
func (*AddRequest) Descriptor
deprecated
func (*AddRequest) Descriptor() ([]byte, []int)
Deprecated: Use AddRequest.ProtoReflect.Descriptor instead.
func (*AddRequest) GetNode ¶
func (x *AddRequest) GetNode() *Node
func (*AddRequest) ProtoMessage ¶
func (*AddRequest) ProtoMessage()
func (*AddRequest) ProtoReflect ¶
func (x *AddRequest) ProtoReflect() protoreflect.Message
func (*AddRequest) Reset ¶
func (x *AddRequest) Reset()
func (*AddRequest) String ¶
func (x *AddRequest) String() string
type AddResponse ¶
type AddResponse struct {
// contains filtered or unexported fields
}
func (*AddResponse) Descriptor
deprecated
func (*AddResponse) Descriptor() ([]byte, []int)
Deprecated: Use AddResponse.ProtoReflect.Descriptor instead.
func (*AddResponse) ProtoMessage ¶
func (*AddResponse) ProtoMessage()
func (*AddResponse) ProtoReflect ¶
func (x *AddResponse) ProtoReflect() protoreflect.Message
func (*AddResponse) Reset ¶
func (x *AddResponse) Reset()
func (*AddResponse) String ¶
func (x *AddResponse) String() string
type ConsistentHashingServiceClient ¶
type ConsistentHashingServiceClient interface { Add(ctx context.Context, in *AddRequest, opts ...grpc.CallOption) (*AddResponse, error) AddN(ctx context.Context, in *AddNRequest, opts ...grpc.CallOption) (*AddNResponse, error) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error) List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) MapKey(ctx context.Context, in *MapKeyRequest, opts ...grpc.CallOption) (*MapKeyResponse, error) }
ConsistentHashingServiceClient is the client API for ConsistentHashingService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewConsistentHashingServiceClient ¶
func NewConsistentHashingServiceClient(cc grpc.ClientConnInterface) ConsistentHashingServiceClient
type ConsistentHashingServiceServer ¶
type ConsistentHashingServiceServer interface { Add(context.Context, *AddRequest) (*AddResponse, error) AddN(context.Context, *AddNRequest) (*AddNResponse, error) Delete(context.Context, *DeleteRequest) (*DeleteResponse, error) List(context.Context, *ListRequest) (*ListResponse, error) MapKey(context.Context, *MapKeyRequest) (*MapKeyResponse, error) }
ConsistentHashingServiceServer is the server API for ConsistentHashingService service.
type DeleteRequest ¶
type DeleteRequest struct { Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` // contains filtered or unexported fields }
func (*DeleteRequest) Descriptor
deprecated
func (*DeleteRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.
func (*DeleteRequest) GetUuid ¶
func (x *DeleteRequest) GetUuid() string
func (*DeleteRequest) ProtoMessage ¶
func (*DeleteRequest) ProtoMessage()
func (*DeleteRequest) ProtoReflect ¶
func (x *DeleteRequest) ProtoReflect() protoreflect.Message
func (*DeleteRequest) Reset ¶
func (x *DeleteRequest) Reset()
func (*DeleteRequest) String ¶
func (x *DeleteRequest) String() string
type DeleteResponse ¶
type DeleteResponse struct {
// contains filtered or unexported fields
}
func (*DeleteResponse) Descriptor
deprecated
func (*DeleteResponse) Descriptor() ([]byte, []int)
Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead.
func (*DeleteResponse) ProtoMessage ¶
func (*DeleteResponse) ProtoMessage()
func (*DeleteResponse) ProtoReflect ¶
func (x *DeleteResponse) ProtoReflect() protoreflect.Message
func (*DeleteResponse) Reset ¶
func (x *DeleteResponse) Reset()
func (*DeleteResponse) String ¶
func (x *DeleteResponse) String() string
type Key ¶
type Key struct { NodeUuid string `protobuf:"bytes,1,opt,name=node_uuid,json=nodeUuid,proto3" json:"node_uuid,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` CreateTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` UpdateTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` // contains filtered or unexported fields }
func (*Key) Descriptor
deprecated
func (*Key) GetCreateTime ¶
func (x *Key) GetCreateTime() *timestamppb.Timestamp
func (*Key) GetNodeUuid ¶
func (*Key) GetUpdateTime ¶
func (x *Key) GetUpdateTime() *timestamppb.Timestamp
func (*Key) ProtoMessage ¶
func (*Key) ProtoMessage()
func (*Key) ProtoReflect ¶
func (x *Key) ProtoReflect() protoreflect.Message
type ListRequest ¶
type ListRequest struct {
// contains filtered or unexported fields
}
func (*ListRequest) Descriptor
deprecated
func (*ListRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.
func (*ListRequest) ProtoMessage ¶
func (*ListRequest) ProtoMessage()
func (*ListRequest) ProtoReflect ¶
func (x *ListRequest) ProtoReflect() protoreflect.Message
func (*ListRequest) Reset ¶
func (x *ListRequest) Reset()
func (*ListRequest) String ¶
func (x *ListRequest) String() string
type ListResponse ¶
type ListResponse struct { Nodes []*Node `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"` // contains filtered or unexported fields }
func (*ListResponse) Descriptor
deprecated
func (*ListResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.
func (*ListResponse) GetNodes ¶
func (x *ListResponse) GetNodes() []*Node
func (*ListResponse) ProtoMessage ¶
func (*ListResponse) ProtoMessage()
func (*ListResponse) ProtoReflect ¶
func (x *ListResponse) ProtoReflect() protoreflect.Message
func (*ListResponse) Reset ¶
func (x *ListResponse) Reset()
func (*ListResponse) String ¶
func (x *ListResponse) String() string
type MapKeyRequest ¶
type MapKeyRequest struct { Key *Key `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // contains filtered or unexported fields }
func (*MapKeyRequest) Descriptor
deprecated
func (*MapKeyRequest) Descriptor() ([]byte, []int)
Deprecated: Use MapKeyRequest.ProtoReflect.Descriptor instead.
func (*MapKeyRequest) GetKey ¶
func (x *MapKeyRequest) GetKey() *Key
func (*MapKeyRequest) ProtoMessage ¶
func (*MapKeyRequest) ProtoMessage()
func (*MapKeyRequest) ProtoReflect ¶
func (x *MapKeyRequest) ProtoReflect() protoreflect.Message
func (*MapKeyRequest) Reset ¶
func (x *MapKeyRequest) Reset()
func (*MapKeyRequest) String ¶
func (x *MapKeyRequest) String() string
type MapKeyResponse ¶
type MapKeyResponse struct { Key *Key `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // contains filtered or unexported fields }
func (*MapKeyResponse) Descriptor
deprecated
func (*MapKeyResponse) Descriptor() ([]byte, []int)
Deprecated: Use MapKeyResponse.ProtoReflect.Descriptor instead.
func (*MapKeyResponse) GetKey ¶
func (x *MapKeyResponse) GetKey() *Key
func (*MapKeyResponse) ProtoMessage ¶
func (*MapKeyResponse) ProtoMessage()
func (*MapKeyResponse) ProtoReflect ¶
func (x *MapKeyResponse) ProtoReflect() protoreflect.Message
func (*MapKeyResponse) Reset ¶
func (x *MapKeyResponse) Reset()
func (*MapKeyResponse) String ¶
func (x *MapKeyResponse) String() string
type Node ¶
type Node struct { // base64 code of node ip or hostname or something like this. Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` ExtraInfo string `protobuf:"bytes,2,opt,name=extra_info,json=extraInfo,proto3" json:"extra_info,omitempty"` CreateTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` UpdateTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` // contains filtered or unexported fields }
func (*Node) Descriptor
deprecated
func (*Node) GetCreateTime ¶
func (x *Node) GetCreateTime() *timestamppb.Timestamp
func (*Node) GetExtraInfo ¶
func (*Node) GetUpdateTime ¶
func (x *Node) GetUpdateTime() *timestamppb.Timestamp
func (*Node) ProtoMessage ¶
func (*Node) ProtoMessage()
func (*Node) ProtoReflect ¶
func (x *Node) ProtoReflect() protoreflect.Message
type OpLogEntry ¶
type OpLogEntry struct { OperationType OperationType `` /* 164-byte string literal not displayed */ OperationTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=operation_time,json=operationTime,proto3" json:"operation_time,omitempty"` Payload []byte `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"` // contains filtered or unexported fields }
func (*OpLogEntry) Descriptor
deprecated
func (*OpLogEntry) Descriptor() ([]byte, []int)
Deprecated: Use OpLogEntry.ProtoReflect.Descriptor instead.
func (*OpLogEntry) GetOperationTime ¶
func (x *OpLogEntry) GetOperationTime() *timestamppb.Timestamp
func (*OpLogEntry) GetOperationType ¶
func (x *OpLogEntry) GetOperationType() OperationType
func (*OpLogEntry) GetPayload ¶
func (x *OpLogEntry) GetPayload() []byte
func (*OpLogEntry) ProtoMessage ¶
func (*OpLogEntry) ProtoMessage()
func (*OpLogEntry) ProtoReflect ¶
func (x *OpLogEntry) ProtoReflect() protoreflect.Message
func (*OpLogEntry) Reset ¶
func (x *OpLogEntry) Reset()
func (*OpLogEntry) String ¶
func (x *OpLogEntry) String() string
type OperationType ¶
type OperationType int32
const ( OperationType_OPERATION_TYPE_ADD OperationType = 0 OperationType_OPERATION_TYPE_REMOVE OperationType = 1 )
func (OperationType) Descriptor ¶
func (OperationType) Descriptor() protoreflect.EnumDescriptor
func (OperationType) Enum ¶
func (x OperationType) Enum() *OperationType
func (OperationType) EnumDescriptor
deprecated
func (OperationType) EnumDescriptor() ([]byte, []int)
Deprecated: Use OperationType.Descriptor instead.
func (OperationType) Number ¶
func (x OperationType) Number() protoreflect.EnumNumber
func (OperationType) String ¶
func (x OperationType) String() string
func (OperationType) Type ¶
func (OperationType) Type() protoreflect.EnumType
type UnimplementedConsistentHashingServiceServer ¶
type UnimplementedConsistentHashingServiceServer struct { }
UnimplementedConsistentHashingServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedConsistentHashingServiceServer) Add ¶
func (*UnimplementedConsistentHashingServiceServer) Add(context.Context, *AddRequest) (*AddResponse, error)
func (*UnimplementedConsistentHashingServiceServer) AddN ¶
func (*UnimplementedConsistentHashingServiceServer) AddN(context.Context, *AddNRequest) (*AddNResponse, error)
func (*UnimplementedConsistentHashingServiceServer) Delete ¶
func (*UnimplementedConsistentHashingServiceServer) Delete(context.Context, *DeleteRequest) (*DeleteResponse, error)
func (*UnimplementedConsistentHashingServiceServer) List ¶
func (*UnimplementedConsistentHashingServiceServer) List(context.Context, *ListRequest) (*ListResponse, error)
func (*UnimplementedConsistentHashingServiceServer) MapKey ¶
func (*UnimplementedConsistentHashingServiceServer) MapKey(context.Context, *MapKeyRequest) (*MapKeyResponse, error)