Documentation ¶
Index ¶
- Variables
- func RegisterRaftServer(s *grpc.Server, srv RaftServer)
- type Chunk
- func (*Chunk) Descriptor() ([]byte, []int)
- func (m *Chunk) Marshal() (dAtA []byte, err error)
- func (m *Chunk) MarshalTo(dAtA []byte) (int, error)
- func (m *Chunk) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Chunk) ProtoMessage()
- func (m *Chunk) Reset()
- func (m *Chunk) Size() (n int)
- func (m *Chunk) String() string
- func (m *Chunk) Unmarshal(dAtA []byte) error
- func (m *Chunk) XXX_DiscardUnknown()
- func (m *Chunk) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Chunk) XXX_Merge(src proto.Message)
- func (m *Chunk) XXX_Size() int
- func (m *Chunk) XXX_Unmarshal(b []byte) error
- type RaftClient
- type RaftServer
- type Raft_MessageClient
- type Raft_MessageServer
- type Raft_SnapshotClient
- type Raft_SnapshotServer
- type UnimplementedRaftServer
- func (*UnimplementedRaftServer) Join(ctx context.Context, req *raftpb.Member) (*raftpb.JoinResponse, error)
- func (*UnimplementedRaftServer) Message(srv Raft_MessageServer) error
- func (*UnimplementedRaftServer) PromoteMember(ctx context.Context, req *raftpb.Member) (*empty.Empty, error)
- func (*UnimplementedRaftServer) Snapshot(srv Raft_SnapshotServer) error
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func RegisterRaftServer ¶
func RegisterRaftServer(s *grpc.Server, srv RaftServer)
Types ¶
type Chunk ¶
type Chunk struct { // Index specifies the chunk index. Index uint64 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"` // Data specifies the raw chunk data. Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Chunk) Descriptor ¶
func (*Chunk) ProtoMessage ¶
func (*Chunk) ProtoMessage()
func (*Chunk) XXX_DiscardUnknown ¶
func (m *Chunk) XXX_DiscardUnknown()
func (*Chunk) XXX_Marshal ¶
func (*Chunk) XXX_Unmarshal ¶
type RaftClient ¶
type RaftClient interface { Message(ctx context.Context, opts ...grpc.CallOption) (Raft_MessageClient, error) Snapshot(ctx context.Context, opts ...grpc.CallOption) (Raft_SnapshotClient, error) Join(ctx context.Context, in *raftpb.Member, opts ...grpc.CallOption) (*raftpb.JoinResponse, error) PromoteMember(ctx context.Context, in *raftpb.Member, opts ...grpc.CallOption) (*empty.Empty, 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 RaftServer ¶
type RaftServer interface { Message(Raft_MessageServer) error Snapshot(Raft_SnapshotServer) error Join(context.Context, *raftpb.Member) (*raftpb.JoinResponse, error) PromoteMember(context.Context, *raftpb.Member) (*empty.Empty, error) }
RaftServer is the server API for Raft service.
type Raft_MessageClient ¶
type Raft_MessageServer ¶
type Raft_SnapshotClient ¶
type Raft_SnapshotServer ¶
type UnimplementedRaftServer ¶
type UnimplementedRaftServer struct { }
UnimplementedRaftServer can be embedded to have forward compatible implementations.
func (*UnimplementedRaftServer) Join ¶
func (*UnimplementedRaftServer) Join(ctx context.Context, req *raftpb.Member) (*raftpb.JoinResponse, error)
func (*UnimplementedRaftServer) Message ¶
func (*UnimplementedRaftServer) Message(srv Raft_MessageServer) error
func (*UnimplementedRaftServer) PromoteMember ¶
func (*UnimplementedRaftServer) Snapshot ¶
func (*UnimplementedRaftServer) Snapshot(srv Raft_SnapshotServer) error
Click to show internal directories.
Click to hide internal directories.