Documentation ¶
Index ¶
- Variables
- func RegisterMultiRaftServer(s *grpc.Server, srv MultiRaftServer)
- func RegisterNodeServer(s *grpc.Server, srv NodeServer)
- func RegisterRaftServer(s *grpc.Server, srv RaftServer)
- type GetMembersRequest
- func (*GetMembersRequest) Descriptor() ([]byte, []int)
- func (m *GetMembersRequest) GetClusterID() string
- func (m *GetMembersRequest) Marshal() (dAtA []byte, err error)
- func (m *GetMembersRequest) MarshalTo(dAtA []byte) (int, error)
- func (*GetMembersRequest) ProtoMessage()
- func (m *GetMembersRequest) Reset()
- func (m *GetMembersRequest) Size() (n int)
- func (m *GetMembersRequest) String() string
- func (m *GetMembersRequest) Unmarshal(dAtA []byte) error
- func (m *GetMembersRequest) XXX_DiscardUnknown()
- func (m *GetMembersRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetMembersRequest) XXX_Merge(src proto.Message)
- func (m *GetMembersRequest) XXX_Size() int
- func (m *GetMembersRequest) XXX_Unmarshal(b []byte) error
- type GetMembersResponse
- func (*GetMembersResponse) Descriptor() ([]byte, []int)
- func (m *GetMembersResponse) GetMembers() []*Member
- func (m *GetMembersResponse) Marshal() (dAtA []byte, err error)
- func (m *GetMembersResponse) MarshalTo(dAtA []byte) (int, error)
- func (*GetMembersResponse) ProtoMessage()
- func (m *GetMembersResponse) Reset()
- func (m *GetMembersResponse) Size() (n int)
- func (m *GetMembersResponse) String() string
- func (m *GetMembersResponse) Unmarshal(dAtA []byte) error
- func (m *GetMembersResponse) XXX_DiscardUnknown()
- func (m *GetMembersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetMembersResponse) XXX_Merge(src proto.Message)
- func (m *GetMembersResponse) XXX_Size() int
- func (m *GetMembersResponse) XXX_Unmarshal(b []byte) error
- type GetStatusRequest
- func (*GetStatusRequest) Descriptor() ([]byte, []int)
- func (m *GetStatusRequest) GetClusterID() string
- func (m *GetStatusRequest) Marshal() (dAtA []byte, err error)
- func (m *GetStatusRequest) MarshalTo(dAtA []byte) (int, error)
- func (*GetStatusRequest) ProtoMessage()
- func (m *GetStatusRequest) Reset()
- func (m *GetStatusRequest) Size() (n int)
- func (m *GetStatusRequest) String() string
- func (m *GetStatusRequest) Unmarshal(dAtA []byte) error
- func (m *GetStatusRequest) XXX_DiscardUnknown()
- func (m *GetStatusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetStatusRequest) XXX_Merge(src proto.Message)
- func (m *GetStatusRequest) XXX_Size() int
- func (m *GetStatusRequest) XXX_Unmarshal(b []byte) error
- type GetStatusResponse
- func (*GetStatusResponse) Descriptor() ([]byte, []int)
- func (m *GetStatusResponse) GetHasBeenBootstrapped() bool
- func (m *GetStatusResponse) GetIsInCluster() bool
- func (m *GetStatusResponse) GetIsLeader() bool
- func (m *GetStatusResponse) Marshal() (dAtA []byte, err error)
- func (m *GetStatusResponse) MarshalTo(dAtA []byte) (int, error)
- func (*GetStatusResponse) ProtoMessage()
- func (m *GetStatusResponse) Reset()
- func (m *GetStatusResponse) Size() (n int)
- func (m *GetStatusResponse) String() string
- func (m *GetStatusResponse) Unmarshal(dAtA []byte) error
- func (m *GetStatusResponse) XXX_DiscardUnknown()
- func (m *GetStatusResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetStatusResponse) XXX_Merge(src proto.Message)
- func (m *GetStatusResponse) XXX_Size() int
- func (m *GetStatusResponse) XXX_Unmarshal(b []byte) error
- type JoinClusterRequest
- func (*JoinClusterRequest) Descriptor() ([]byte, []int)
- func (m *JoinClusterRequest) GetClusterID() string
- func (m *JoinClusterRequest) GetContext() *RaftContext
- func (m *JoinClusterRequest) Marshal() (dAtA []byte, err error)
- func (m *JoinClusterRequest) MarshalTo(dAtA []byte) (int, error)
- func (*JoinClusterRequest) ProtoMessage()
- func (m *JoinClusterRequest) Reset()
- func (m *JoinClusterRequest) Size() (n int)
- func (m *JoinClusterRequest) String() string
- func (m *JoinClusterRequest) Unmarshal(dAtA []byte) error
- func (m *JoinClusterRequest) XXX_DiscardUnknown()
- func (m *JoinClusterRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *JoinClusterRequest) XXX_Merge(src proto.Message)
- func (m *JoinClusterRequest) XXX_Size() int
- func (m *JoinClusterRequest) XXX_Unmarshal(b []byte) error
- type JoinClusterResponse
- func (*JoinClusterResponse) Descriptor() ([]byte, []int)
- func (m *JoinClusterResponse) Marshal() (dAtA []byte, err error)
- func (m *JoinClusterResponse) MarshalTo(dAtA []byte) (int, error)
- func (*JoinClusterResponse) ProtoMessage()
- func (m *JoinClusterResponse) Reset()
- func (m *JoinClusterResponse) Size() (n int)
- func (m *JoinClusterResponse) String() string
- func (m *JoinClusterResponse) Unmarshal(dAtA []byte) error
- func (m *JoinClusterResponse) XXX_DiscardUnknown()
- func (m *JoinClusterResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *JoinClusterResponse) XXX_Merge(src proto.Message)
- func (m *JoinClusterResponse) XXX_Size() int
- func (m *JoinClusterResponse) XXX_Unmarshal(b []byte) error
- type Member
- func (*Member) Descriptor() ([]byte, []int)
- func (m *Member) GetAddress() string
- func (m *Member) GetID() uint64
- func (m *Member) GetIsAlive() bool
- func (m *Member) GetIsLeader() bool
- func (m *Member) Marshal() (dAtA []byte, err error)
- func (m *Member) MarshalTo(dAtA []byte) (int, error)
- func (*Member) ProtoMessage()
- func (m *Member) Reset()
- func (m *Member) Size() (n int)
- func (m *Member) String() string
- func (m *Member) Unmarshal(dAtA []byte) error
- func (m *Member) XXX_DiscardUnknown()
- func (m *Member) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Member) XXX_Merge(src proto.Message)
- func (m *Member) XXX_Size() int
- func (m *Member) XXX_Unmarshal(b []byte) error
- type MultiRaftClient
- type MultiRaftServer
- type NodeClient
- type NodeServer
- type Payload
- func (*Payload) Descriptor() ([]byte, []int)
- func (m *Payload) GetData() []byte
- func (m *Payload) Marshal() (dAtA []byte, err error)
- func (m *Payload) MarshalTo(dAtA []byte) (int, error)
- func (*Payload) ProtoMessage()
- func (m *Payload) Reset()
- func (m *Payload) Size() (n int)
- func (m *Payload) String() string
- func (m *Payload) Unmarshal(dAtA []byte) error
- func (m *Payload) XXX_DiscardUnknown()
- func (m *Payload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Payload) XXX_Merge(src proto.Message)
- func (m *Payload) XXX_Size() int
- func (m *Payload) XXX_Unmarshal(b []byte) error
- type PeerResponse
- func (*PeerResponse) Descriptor() ([]byte, []int)
- func (m *PeerResponse) GetStatus() bool
- func (m *PeerResponse) Marshal() (dAtA []byte, err error)
- func (m *PeerResponse) MarshalTo(dAtA []byte) (int, error)
- func (*PeerResponse) ProtoMessage()
- func (m *PeerResponse) Reset()
- func (m *PeerResponse) Size() (n int)
- func (m *PeerResponse) String() string
- func (m *PeerResponse) Unmarshal(dAtA []byte) error
- func (m *PeerResponse) XXX_DiscardUnknown()
- func (m *PeerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PeerResponse) XXX_Merge(src proto.Message)
- func (m *PeerResponse) XXX_Size() int
- func (m *PeerResponse) XXX_Unmarshal(b []byte) error
- type ProcessMessageRequest
- func (*ProcessMessageRequest) Descriptor() ([]byte, []int)
- func (m *ProcessMessageRequest) GetClusterID() string
- func (m *ProcessMessageRequest) GetMessage() *raftpb.Message
- func (m *ProcessMessageRequest) Marshal() (dAtA []byte, err error)
- func (m *ProcessMessageRequest) MarshalTo(dAtA []byte) (int, error)
- func (*ProcessMessageRequest) ProtoMessage()
- func (m *ProcessMessageRequest) Reset()
- func (m *ProcessMessageRequest) Size() (n int)
- func (m *ProcessMessageRequest) String() string
- func (m *ProcessMessageRequest) Unmarshal(dAtA []byte) error
- func (m *ProcessMessageRequest) XXX_DiscardUnknown()
- func (m *ProcessMessageRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ProcessMessageRequest) XXX_Merge(src proto.Message)
- func (m *ProcessMessageRequest) XXX_Size() int
- func (m *ProcessMessageRequest) XXX_Unmarshal(b []byte) error
- type RaftClient
- type RaftContext
- func (*RaftContext) Descriptor() ([]byte, []int)
- func (m *RaftContext) GetAddress() string
- func (m *RaftContext) GetClusters() []string
- func (m *RaftContext) GetID() uint64
- func (m *RaftContext) Marshal() (dAtA []byte, err error)
- func (m *RaftContext) MarshalTo(dAtA []byte) (int, error)
- func (*RaftContext) ProtoMessage()
- func (m *RaftContext) Reset()
- func (m *RaftContext) Size() (n int)
- func (m *RaftContext) String() string
- func (m *RaftContext) Unmarshal(dAtA []byte) error
- func (m *RaftContext) XXX_DiscardUnknown()
- func (m *RaftContext) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RaftContext) XXX_Merge(src proto.Message)
- func (m *RaftContext) XXX_Size() int
- func (m *RaftContext) XXX_Unmarshal(b []byte) error
- type RaftServer
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthCluster = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowCluster = fmt.Errorf("proto: integer overflow") )
Functions ¶
func RegisterMultiRaftServer ¶ added in v1.3.0
func RegisterMultiRaftServer(s *grpc.Server, srv MultiRaftServer)
func RegisterNodeServer ¶
func RegisterNodeServer(s *grpc.Server, srv NodeServer)
func RegisterRaftServer ¶
func RegisterRaftServer(s *grpc.Server, srv RaftServer)
Types ¶
type GetMembersRequest ¶
type GetMembersRequest struct { ClusterID string `protobuf:"bytes,1,opt,name=ClusterID,proto3" json:"ClusterID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*GetMembersRequest) Descriptor ¶
func (*GetMembersRequest) Descriptor() ([]byte, []int)
func (*GetMembersRequest) GetClusterID ¶ added in v1.3.0
func (m *GetMembersRequest) GetClusterID() string
func (*GetMembersRequest) Marshal ¶ added in v1.3.0
func (m *GetMembersRequest) Marshal() (dAtA []byte, err error)
func (*GetMembersRequest) MarshalTo ¶ added in v1.3.0
func (m *GetMembersRequest) MarshalTo(dAtA []byte) (int, error)
func (*GetMembersRequest) ProtoMessage ¶
func (*GetMembersRequest) ProtoMessage()
func (*GetMembersRequest) Reset ¶
func (m *GetMembersRequest) Reset()
func (*GetMembersRequest) Size ¶ added in v1.3.0
func (m *GetMembersRequest) Size() (n int)
func (*GetMembersRequest) String ¶
func (m *GetMembersRequest) String() string
func (*GetMembersRequest) Unmarshal ¶ added in v1.3.0
func (m *GetMembersRequest) Unmarshal(dAtA []byte) error
func (*GetMembersRequest) XXX_DiscardUnknown ¶
func (m *GetMembersRequest) XXX_DiscardUnknown()
func (*GetMembersRequest) XXX_Marshal ¶
func (m *GetMembersRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetMembersRequest) XXX_Merge ¶
func (m *GetMembersRequest) XXX_Merge(src proto.Message)
func (*GetMembersRequest) XXX_Size ¶
func (m *GetMembersRequest) XXX_Size() int
func (*GetMembersRequest) XXX_Unmarshal ¶
func (m *GetMembersRequest) XXX_Unmarshal(b []byte) error
type GetMembersResponse ¶
type GetMembersResponse struct { Members []*Member `protobuf:"bytes,1,rep,name=Members,proto3" json:"Members,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*GetMembersResponse) Descriptor ¶
func (*GetMembersResponse) Descriptor() ([]byte, []int)
func (*GetMembersResponse) GetMembers ¶
func (m *GetMembersResponse) GetMembers() []*Member
func (*GetMembersResponse) Marshal ¶ added in v1.3.0
func (m *GetMembersResponse) Marshal() (dAtA []byte, err error)
func (*GetMembersResponse) MarshalTo ¶ added in v1.3.0
func (m *GetMembersResponse) MarshalTo(dAtA []byte) (int, error)
func (*GetMembersResponse) ProtoMessage ¶
func (*GetMembersResponse) ProtoMessage()
func (*GetMembersResponse) Reset ¶
func (m *GetMembersResponse) Reset()
func (*GetMembersResponse) Size ¶ added in v1.3.0
func (m *GetMembersResponse) Size() (n int)
func (*GetMembersResponse) String ¶
func (m *GetMembersResponse) String() string
func (*GetMembersResponse) Unmarshal ¶ added in v1.3.0
func (m *GetMembersResponse) Unmarshal(dAtA []byte) error
func (*GetMembersResponse) XXX_DiscardUnknown ¶
func (m *GetMembersResponse) XXX_DiscardUnknown()
func (*GetMembersResponse) XXX_Marshal ¶
func (m *GetMembersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetMembersResponse) XXX_Merge ¶
func (m *GetMembersResponse) XXX_Merge(src proto.Message)
func (*GetMembersResponse) XXX_Size ¶
func (m *GetMembersResponse) XXX_Size() int
func (*GetMembersResponse) XXX_Unmarshal ¶
func (m *GetMembersResponse) XXX_Unmarshal(b []byte) error
type GetStatusRequest ¶
type GetStatusRequest struct { ClusterID string `protobuf:"bytes,1,opt,name=ClusterID,proto3" json:"ClusterID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*GetStatusRequest) Descriptor ¶
func (*GetStatusRequest) Descriptor() ([]byte, []int)
func (*GetStatusRequest) GetClusterID ¶ added in v1.3.0
func (m *GetStatusRequest) GetClusterID() string
func (*GetStatusRequest) Marshal ¶ added in v1.3.0
func (m *GetStatusRequest) Marshal() (dAtA []byte, err error)
func (*GetStatusRequest) MarshalTo ¶ added in v1.3.0
func (m *GetStatusRequest) MarshalTo(dAtA []byte) (int, error)
func (*GetStatusRequest) ProtoMessage ¶
func (*GetStatusRequest) ProtoMessage()
func (*GetStatusRequest) Reset ¶
func (m *GetStatusRequest) Reset()
func (*GetStatusRequest) Size ¶ added in v1.3.0
func (m *GetStatusRequest) Size() (n int)
func (*GetStatusRequest) String ¶
func (m *GetStatusRequest) String() string
func (*GetStatusRequest) Unmarshal ¶ added in v1.3.0
func (m *GetStatusRequest) Unmarshal(dAtA []byte) error
func (*GetStatusRequest) XXX_DiscardUnknown ¶
func (m *GetStatusRequest) XXX_DiscardUnknown()
func (*GetStatusRequest) XXX_Marshal ¶
func (m *GetStatusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetStatusRequest) XXX_Merge ¶
func (m *GetStatusRequest) XXX_Merge(src proto.Message)
func (*GetStatusRequest) XXX_Size ¶
func (m *GetStatusRequest) XXX_Size() int
func (*GetStatusRequest) XXX_Unmarshal ¶
func (m *GetStatusRequest) XXX_Unmarshal(b []byte) error
type GetStatusResponse ¶
type GetStatusResponse struct { IsLeader bool `protobuf:"varint,1,opt,name=IsLeader,proto3" json:"IsLeader,omitempty"` HasBeenBootstrapped bool `protobuf:"varint,2,opt,name=HasBeenBootstrapped,proto3" json:"HasBeenBootstrapped,omitempty"` IsInCluster bool `protobuf:"varint,3,opt,name=IsInCluster,proto3" json:"IsInCluster,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*GetStatusResponse) Descriptor ¶
func (*GetStatusResponse) Descriptor() ([]byte, []int)
func (*GetStatusResponse) GetHasBeenBootstrapped ¶
func (m *GetStatusResponse) GetHasBeenBootstrapped() bool
func (*GetStatusResponse) GetIsInCluster ¶
func (m *GetStatusResponse) GetIsInCluster() bool
func (*GetStatusResponse) GetIsLeader ¶
func (m *GetStatusResponse) GetIsLeader() bool
func (*GetStatusResponse) Marshal ¶ added in v1.3.0
func (m *GetStatusResponse) Marshal() (dAtA []byte, err error)
func (*GetStatusResponse) MarshalTo ¶ added in v1.3.0
func (m *GetStatusResponse) MarshalTo(dAtA []byte) (int, error)
func (*GetStatusResponse) ProtoMessage ¶
func (*GetStatusResponse) ProtoMessage()
func (*GetStatusResponse) Reset ¶
func (m *GetStatusResponse) Reset()
func (*GetStatusResponse) Size ¶ added in v1.3.0
func (m *GetStatusResponse) Size() (n int)
func (*GetStatusResponse) String ¶
func (m *GetStatusResponse) String() string
func (*GetStatusResponse) Unmarshal ¶ added in v1.3.0
func (m *GetStatusResponse) Unmarshal(dAtA []byte) error
func (*GetStatusResponse) XXX_DiscardUnknown ¶
func (m *GetStatusResponse) XXX_DiscardUnknown()
func (*GetStatusResponse) XXX_Marshal ¶
func (m *GetStatusResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetStatusResponse) XXX_Merge ¶
func (m *GetStatusResponse) XXX_Merge(src proto.Message)
func (*GetStatusResponse) XXX_Size ¶
func (m *GetStatusResponse) XXX_Size() int
func (*GetStatusResponse) XXX_Unmarshal ¶
func (m *GetStatusResponse) XXX_Unmarshal(b []byte) error
type JoinClusterRequest ¶ added in v1.3.0
type JoinClusterRequest struct { ClusterID string `protobuf:"bytes,1,opt,name=ClusterID,proto3" json:"ClusterID,omitempty"` Context *RaftContext `protobuf:"bytes,2,opt,name=Context,proto3" json:"Context,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*JoinClusterRequest) Descriptor ¶ added in v1.3.0
func (*JoinClusterRequest) Descriptor() ([]byte, []int)
func (*JoinClusterRequest) GetClusterID ¶ added in v1.3.0
func (m *JoinClusterRequest) GetClusterID() string
func (*JoinClusterRequest) GetContext ¶ added in v1.3.0
func (m *JoinClusterRequest) GetContext() *RaftContext
func (*JoinClusterRequest) Marshal ¶ added in v1.3.0
func (m *JoinClusterRequest) Marshal() (dAtA []byte, err error)
func (*JoinClusterRequest) MarshalTo ¶ added in v1.3.0
func (m *JoinClusterRequest) MarshalTo(dAtA []byte) (int, error)
func (*JoinClusterRequest) ProtoMessage ¶ added in v1.3.0
func (*JoinClusterRequest) ProtoMessage()
func (*JoinClusterRequest) Reset ¶ added in v1.3.0
func (m *JoinClusterRequest) Reset()
func (*JoinClusterRequest) Size ¶ added in v1.3.0
func (m *JoinClusterRequest) Size() (n int)
func (*JoinClusterRequest) String ¶ added in v1.3.0
func (m *JoinClusterRequest) String() string
func (*JoinClusterRequest) Unmarshal ¶ added in v1.3.0
func (m *JoinClusterRequest) Unmarshal(dAtA []byte) error
func (*JoinClusterRequest) XXX_DiscardUnknown ¶ added in v1.3.0
func (m *JoinClusterRequest) XXX_DiscardUnknown()
func (*JoinClusterRequest) XXX_Marshal ¶ added in v1.3.0
func (m *JoinClusterRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*JoinClusterRequest) XXX_Merge ¶ added in v1.3.0
func (m *JoinClusterRequest) XXX_Merge(src proto.Message)
func (*JoinClusterRequest) XXX_Size ¶ added in v1.3.0
func (m *JoinClusterRequest) XXX_Size() int
func (*JoinClusterRequest) XXX_Unmarshal ¶ added in v1.3.0
func (m *JoinClusterRequest) XXX_Unmarshal(b []byte) error
type JoinClusterResponse ¶
type JoinClusterResponse struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*JoinClusterResponse) Descriptor ¶
func (*JoinClusterResponse) Descriptor() ([]byte, []int)
func (*JoinClusterResponse) Marshal ¶ added in v1.3.0
func (m *JoinClusterResponse) Marshal() (dAtA []byte, err error)
func (*JoinClusterResponse) MarshalTo ¶ added in v1.3.0
func (m *JoinClusterResponse) MarshalTo(dAtA []byte) (int, error)
func (*JoinClusterResponse) ProtoMessage ¶
func (*JoinClusterResponse) ProtoMessage()
func (*JoinClusterResponse) Reset ¶
func (m *JoinClusterResponse) Reset()
func (*JoinClusterResponse) Size ¶ added in v1.3.0
func (m *JoinClusterResponse) Size() (n int)
func (*JoinClusterResponse) String ¶
func (m *JoinClusterResponse) String() string
func (*JoinClusterResponse) Unmarshal ¶ added in v1.3.0
func (m *JoinClusterResponse) Unmarshal(dAtA []byte) error
func (*JoinClusterResponse) XXX_DiscardUnknown ¶
func (m *JoinClusterResponse) XXX_DiscardUnknown()
func (*JoinClusterResponse) XXX_Marshal ¶
func (m *JoinClusterResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*JoinClusterResponse) XXX_Merge ¶
func (m *JoinClusterResponse) XXX_Merge(src proto.Message)
func (*JoinClusterResponse) XXX_Size ¶
func (m *JoinClusterResponse) XXX_Size() int
func (*JoinClusterResponse) XXX_Unmarshal ¶
func (m *JoinClusterResponse) XXX_Unmarshal(b []byte) error
type Member ¶
type Member struct { ID uint64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` Address string `protobuf:"bytes,2,opt,name=Address,proto3" json:"Address,omitempty"` IsLeader bool `protobuf:"varint,3,opt,name=IsLeader,proto3" json:"IsLeader,omitempty"` IsAlive bool `protobuf:"varint,4,opt,name=IsAlive,proto3" json:"IsAlive,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Member) Descriptor ¶
func (*Member) GetAddress ¶
func (*Member) GetIsAlive ¶
func (*Member) GetIsLeader ¶
func (*Member) ProtoMessage ¶
func (*Member) ProtoMessage()
func (*Member) XXX_DiscardUnknown ¶
func (m *Member) XXX_DiscardUnknown()
func (*Member) XXX_Marshal ¶
func (*Member) XXX_Unmarshal ¶
type MultiRaftClient ¶ added in v1.3.0
type MultiRaftClient interface { ProcessMessage(ctx context.Context, in *ProcessMessageRequest, opts ...grpc.CallOption) (*Payload, error) JoinCluster(ctx context.Context, in *JoinClusterRequest, opts ...grpc.CallOption) (*JoinClusterResponse, error) GetMembers(ctx context.Context, in *GetMembersRequest, opts ...grpc.CallOption) (*GetMembersResponse, error) GetStatus(ctx context.Context, in *GetStatusRequest, opts ...grpc.CallOption) (*GetStatusResponse, error) }
MultiRaftClient is the client API for MultiRaft service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewMultiRaftClient ¶ added in v1.3.0
func NewMultiRaftClient(cc *grpc.ClientConn) MultiRaftClient
type MultiRaftServer ¶ added in v1.3.0
type MultiRaftServer interface { ProcessMessage(context.Context, *ProcessMessageRequest) (*Payload, error) JoinCluster(context.Context, *JoinClusterRequest) (*JoinClusterResponse, error) GetMembers(context.Context, *GetMembersRequest) (*GetMembersResponse, error) GetStatus(context.Context, *GetStatusRequest) (*GetStatusResponse, error) }
MultiRaftServer is the server API for MultiRaft service.
type NodeClient ¶
type NodeClient interface { }
NodeClient is the client API for Node service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewNodeClient ¶
func NewNodeClient(cc *grpc.ClientConn) NodeClient
type Payload ¶
type Payload struct { Data []byte `protobuf:"bytes,1,opt,name=Data,proto3" json:"Data,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Payload) Descriptor ¶
func (*Payload) ProtoMessage ¶
func (*Payload) ProtoMessage()
func (*Payload) XXX_DiscardUnknown ¶
func (m *Payload) XXX_DiscardUnknown()
func (*Payload) XXX_Marshal ¶
func (*Payload) XXX_Unmarshal ¶
type PeerResponse ¶
type PeerResponse struct { Status bool `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*PeerResponse) Descriptor ¶
func (*PeerResponse) Descriptor() ([]byte, []int)
func (*PeerResponse) GetStatus ¶
func (m *PeerResponse) GetStatus() bool
func (*PeerResponse) Marshal ¶ added in v1.3.0
func (m *PeerResponse) Marshal() (dAtA []byte, err error)
func (*PeerResponse) MarshalTo ¶ added in v1.3.0
func (m *PeerResponse) MarshalTo(dAtA []byte) (int, error)
func (*PeerResponse) ProtoMessage ¶
func (*PeerResponse) ProtoMessage()
func (*PeerResponse) Reset ¶
func (m *PeerResponse) Reset()
func (*PeerResponse) Size ¶ added in v1.3.0
func (m *PeerResponse) Size() (n int)
func (*PeerResponse) String ¶
func (m *PeerResponse) String() string
func (*PeerResponse) Unmarshal ¶ added in v1.3.0
func (m *PeerResponse) Unmarshal(dAtA []byte) error
func (*PeerResponse) XXX_DiscardUnknown ¶
func (m *PeerResponse) XXX_DiscardUnknown()
func (*PeerResponse) XXX_Marshal ¶
func (m *PeerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PeerResponse) XXX_Merge ¶
func (m *PeerResponse) XXX_Merge(src proto.Message)
func (*PeerResponse) XXX_Size ¶
func (m *PeerResponse) XXX_Size() int
func (*PeerResponse) XXX_Unmarshal ¶
func (m *PeerResponse) XXX_Unmarshal(b []byte) error
type ProcessMessageRequest ¶ added in v1.3.0
type ProcessMessageRequest struct { ClusterID string `protobuf:"bytes,1,opt,name=ClusterID,proto3" json:"ClusterID,omitempty"` Message *raftpb.Message `protobuf:"bytes,2,opt,name=Message,proto3" json:"Message,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ProcessMessageRequest) Descriptor ¶ added in v1.3.0
func (*ProcessMessageRequest) Descriptor() ([]byte, []int)
func (*ProcessMessageRequest) GetClusterID ¶ added in v1.3.0
func (m *ProcessMessageRequest) GetClusterID() string
func (*ProcessMessageRequest) GetMessage ¶ added in v1.3.0
func (m *ProcessMessageRequest) GetMessage() *raftpb.Message
func (*ProcessMessageRequest) Marshal ¶ added in v1.3.0
func (m *ProcessMessageRequest) Marshal() (dAtA []byte, err error)
func (*ProcessMessageRequest) MarshalTo ¶ added in v1.3.0
func (m *ProcessMessageRequest) MarshalTo(dAtA []byte) (int, error)
func (*ProcessMessageRequest) ProtoMessage ¶ added in v1.3.0
func (*ProcessMessageRequest) ProtoMessage()
func (*ProcessMessageRequest) Reset ¶ added in v1.3.0
func (m *ProcessMessageRequest) Reset()
func (*ProcessMessageRequest) Size ¶ added in v1.3.0
func (m *ProcessMessageRequest) Size() (n int)
func (*ProcessMessageRequest) String ¶ added in v1.3.0
func (m *ProcessMessageRequest) String() string
func (*ProcessMessageRequest) Unmarshal ¶ added in v1.3.0
func (m *ProcessMessageRequest) Unmarshal(dAtA []byte) error
func (*ProcessMessageRequest) XXX_DiscardUnknown ¶ added in v1.3.0
func (m *ProcessMessageRequest) XXX_DiscardUnknown()
func (*ProcessMessageRequest) XXX_Marshal ¶ added in v1.3.0
func (m *ProcessMessageRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ProcessMessageRequest) XXX_Merge ¶ added in v1.3.0
func (m *ProcessMessageRequest) XXX_Merge(src proto.Message)
func (*ProcessMessageRequest) XXX_Size ¶ added in v1.3.0
func (m *ProcessMessageRequest) XXX_Size() int
func (*ProcessMessageRequest) XXX_Unmarshal ¶ added in v1.3.0
func (m *ProcessMessageRequest) XXX_Unmarshal(b []byte) error
type RaftClient ¶
type RaftClient interface { ProcessMessage(ctx context.Context, in *raftpb.Message, opts ...grpc.CallOption) (*Payload, error) JoinCluster(ctx context.Context, in *RaftContext, opts ...grpc.CallOption) (*JoinClusterResponse, error) GetMembers(ctx context.Context, in *GetMembersRequest, opts ...grpc.CallOption) (*GetMembersResponse, error) GetStatus(ctx context.Context, in *GetStatusRequest, opts ...grpc.CallOption) (*GetStatusResponse, error) }
RaftClient is the client API for Raft service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewRaftClient ¶
func NewRaftClient(cc *grpc.ClientConn) RaftClient
type RaftContext ¶
type RaftContext struct { ID uint64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` Address string `protobuf:"bytes,2,opt,name=Address,proto3" json:"Address,omitempty"` Clusters []string `protobuf:"bytes,3,rep,name=Clusters,proto3" json:"Clusters,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*RaftContext) Descriptor ¶
func (*RaftContext) Descriptor() ([]byte, []int)
func (*RaftContext) GetAddress ¶
func (m *RaftContext) GetAddress() string
func (*RaftContext) GetClusters ¶ added in v1.3.0
func (m *RaftContext) GetClusters() []string
func (*RaftContext) GetID ¶
func (m *RaftContext) GetID() uint64
func (*RaftContext) Marshal ¶ added in v1.3.0
func (m *RaftContext) Marshal() (dAtA []byte, err error)
func (*RaftContext) MarshalTo ¶ added in v1.3.0
func (m *RaftContext) MarshalTo(dAtA []byte) (int, error)
func (*RaftContext) ProtoMessage ¶
func (*RaftContext) ProtoMessage()
func (*RaftContext) Reset ¶
func (m *RaftContext) Reset()
func (*RaftContext) Size ¶ added in v1.3.0
func (m *RaftContext) Size() (n int)
func (*RaftContext) String ¶
func (m *RaftContext) String() string
func (*RaftContext) Unmarshal ¶ added in v1.3.0
func (m *RaftContext) Unmarshal(dAtA []byte) error
func (*RaftContext) XXX_DiscardUnknown ¶
func (m *RaftContext) XXX_DiscardUnknown()
func (*RaftContext) XXX_Marshal ¶
func (m *RaftContext) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RaftContext) XXX_Merge ¶
func (m *RaftContext) XXX_Merge(src proto.Message)
func (*RaftContext) XXX_Size ¶
func (m *RaftContext) XXX_Size() int
func (*RaftContext) XXX_Unmarshal ¶
func (m *RaftContext) XXX_Unmarshal(b []byte) error
type RaftServer ¶
type RaftServer interface { ProcessMessage(context.Context, *raftpb.Message) (*Payload, error) JoinCluster(context.Context, *RaftContext) (*JoinClusterResponse, error) GetMembers(context.Context, *GetMembersRequest) (*GetMembersResponse, error) GetStatus(context.Context, *GetStatusRequest) (*GetStatusResponse, error) }
RaftServer is the server API for Raft service.