Documentation ¶
Overview ¶
Package clusterpb contains the generate gRPC code
Index ¶
- Variables
- func RegisterClusterLeaderServiceServer(s *grpc.Server, srv ClusterLeaderServiceServer)
- type ClusterLeaderServiceClient
- type ClusterLeaderServiceServer
- type CommitShardMapMessage
- func (*CommitShardMapMessage) Descriptor() ([]byte, []int)deprecated
- func (x *CommitShardMapMessage) GetNodes() []string
- func (x *CommitShardMapMessage) GetShardMapLogIndex() int64
- func (*CommitShardMapMessage) ProtoMessage()
- func (x *CommitShardMapMessage) ProtoReflect() protoreflect.Message
- func (x *CommitShardMapMessage) Reset()
- func (x *CommitShardMapMessage) String() string
- type ConfirmShardMapRequest
- func (*ConfirmShardMapRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ConfirmShardMapRequest) GetLogIndex() int64
- func (x *ConfirmShardMapRequest) GetNodeID() string
- func (*ConfirmShardMapRequest) ProtoMessage()
- func (x *ConfirmShardMapRequest) ProtoReflect() protoreflect.Message
- func (x *ConfirmShardMapRequest) Reset()
- func (x *ConfirmShardMapRequest) String() string
- type ConfirmShardMapResponse
- func (*ConfirmShardMapResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ConfirmShardMapResponse) GetCurrentIndex() int64
- func (x *ConfirmShardMapResponse) GetSuccess() bool
- func (*ConfirmShardMapResponse) ProtoMessage()
- func (x *ConfirmShardMapResponse) ProtoReflect() protoreflect.Message
- func (x *ConfirmShardMapResponse) Reset()
- func (x *ConfirmShardMapResponse) String() string
- type UnimplementedClusterLeaderServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_cluster_proto protoreflect.FileDescriptor
Functions ¶
func RegisterClusterLeaderServiceServer ¶
func RegisterClusterLeaderServiceServer(s *grpc.Server, srv ClusterLeaderServiceServer)
Types ¶
type ClusterLeaderServiceClient ¶
type ClusterLeaderServiceClient interface {
ConfirmShardMap(ctx context.Context, in *ConfirmShardMapRequest, opts ...grpc.CallOption) (*ConfirmShardMapResponse, error)
}
ClusterLeaderServiceClient is the client API for ClusterLeaderService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewClusterLeaderServiceClient ¶
func NewClusterLeaderServiceClient(cc grpc.ClientConnInterface) ClusterLeaderServiceClient
type ClusterLeaderServiceServer ¶
type ClusterLeaderServiceServer interface {
ConfirmShardMap(context.Context, *ConfirmShardMapRequest) (*ConfirmShardMapResponse, error)
}
ClusterLeaderServiceServer is the server API for ClusterLeaderService service.
type CommitShardMapMessage ¶
type CommitShardMapMessage struct { ShardMapLogIndex int64 `protobuf:"varint,1,opt,name=ShardMapLogIndex,proto3" json:"ShardMapLogIndex,omitempty"` Nodes []string `protobuf:"bytes,2,rep,name=Nodes,proto3" json:"Nodes,omitempty"` // contains filtered or unexported fields }
CommitShardMapMessage is sent when the shard map is committed by the leader and all nodes have acknowledged the new shard map. The message contains the nodes in the cluster for the commited map.
func (*CommitShardMapMessage) Descriptor
deprecated
func (*CommitShardMapMessage) Descriptor() ([]byte, []int)
Deprecated: Use CommitShardMapMessage.ProtoReflect.Descriptor instead.
func (*CommitShardMapMessage) GetNodes ¶
func (x *CommitShardMapMessage) GetNodes() []string
func (*CommitShardMapMessage) GetShardMapLogIndex ¶
func (x *CommitShardMapMessage) GetShardMapLogIndex() int64
func (*CommitShardMapMessage) ProtoMessage ¶
func (*CommitShardMapMessage) ProtoMessage()
func (*CommitShardMapMessage) ProtoReflect ¶
func (x *CommitShardMapMessage) ProtoReflect() protoreflect.Message
func (*CommitShardMapMessage) Reset ¶
func (x *CommitShardMapMessage) Reset()
func (*CommitShardMapMessage) String ¶
func (x *CommitShardMapMessage) String() string
type ConfirmShardMapRequest ¶
type ConfirmShardMapRequest struct { LogIndex int64 `protobuf:"varint,1,opt,name=LogIndex,proto3" json:"LogIndex,omitempty"` // LogIndex is the index of the shard map used NodeID string `protobuf:"bytes,2,opt,name=NodeID,proto3" json:"NodeID,omitempty"` // NodeID is the follower's cluster ID. // contains filtered or unexported fields }
ConfirmShardMapRequest is sent by followers to the leader to signal readyness with the new shard map
func (*ConfirmShardMapRequest) Descriptor
deprecated
func (*ConfirmShardMapRequest) Descriptor() ([]byte, []int)
Deprecated: Use ConfirmShardMapRequest.ProtoReflect.Descriptor instead.
func (*ConfirmShardMapRequest) GetLogIndex ¶
func (x *ConfirmShardMapRequest) GetLogIndex() int64
func (*ConfirmShardMapRequest) GetNodeID ¶
func (x *ConfirmShardMapRequest) GetNodeID() string
func (*ConfirmShardMapRequest) ProtoMessage ¶
func (*ConfirmShardMapRequest) ProtoMessage()
func (*ConfirmShardMapRequest) ProtoReflect ¶
func (x *ConfirmShardMapRequest) ProtoReflect() protoreflect.Message
func (*ConfirmShardMapRequest) Reset ¶
func (x *ConfirmShardMapRequest) Reset()
func (*ConfirmShardMapRequest) String ¶
func (x *ConfirmShardMapRequest) String() string
type ConfirmShardMapResponse ¶
type ConfirmShardMapResponse struct { Success bool `protobuf:"varint,1,opt,name=Success,proto3" json:"Success,omitempty"` // Success is set to true if the confirmation is // acknowledged by the leader. CurrentIndex int64 `protobuf:"varint,2,opt,name=CurrentIndex,proto3" json:"CurrentIndex,omitempty"` // CurrentIndex is the currently active shard map. Any lower numbered // contains filtered or unexported fields }
ConfirmShardMapResponse is sent as a response from the leader to the followers.
func (*ConfirmShardMapResponse) Descriptor
deprecated
func (*ConfirmShardMapResponse) Descriptor() ([]byte, []int)
Deprecated: Use ConfirmShardMapResponse.ProtoReflect.Descriptor instead.
func (*ConfirmShardMapResponse) GetCurrentIndex ¶
func (x *ConfirmShardMapResponse) GetCurrentIndex() int64
func (*ConfirmShardMapResponse) GetSuccess ¶
func (x *ConfirmShardMapResponse) GetSuccess() bool
func (*ConfirmShardMapResponse) ProtoMessage ¶
func (*ConfirmShardMapResponse) ProtoMessage()
func (*ConfirmShardMapResponse) ProtoReflect ¶
func (x *ConfirmShardMapResponse) ProtoReflect() protoreflect.Message
func (*ConfirmShardMapResponse) Reset ¶
func (x *ConfirmShardMapResponse) Reset()
func (*ConfirmShardMapResponse) String ¶
func (x *ConfirmShardMapResponse) String() string
type UnimplementedClusterLeaderServiceServer ¶
type UnimplementedClusterLeaderServiceServer struct { }
UnimplementedClusterLeaderServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedClusterLeaderServiceServer) ConfirmShardMap ¶
func (*UnimplementedClusterLeaderServiceServer) ConfirmShardMap(context.Context, *ConfirmShardMapRequest) (*ConfirmShardMapResponse, error)