clusterpb

package
v0.0.27 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package clusterpb contains the generate gRPC code

Index

Constants

This section is empty.

Variables

View Source
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.

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=shard_map_log_index,json=shardMapLogIndex,proto3" json:"shard_map_log_index,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=log_index,json=logIndex,proto3" json:"log_index,omitempty"` // LogIndex is the index of the shard map used
	NodeId   string `protobuf:"bytes,2,opt,name=node_id,json=nodeId,proto3" json:"node_id,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"`
	CurrentIndex int64 `protobuf:"varint,2,opt,name=current_index,json=currentIndex,proto3" json:"current_index,omitempty"`
	// contains filtered or unexported fields
}

ConfirmShardMapResponse is sent as a response from the leader to the followers.Success is set to true if the confirmation is acknowledged by the leader. CurrentIndex is the currently active shard map. Any lower numbered shard maps can be ignored by the follower.

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

Jump to

Keyboard shortcuts

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