server

package
v0.0.0-...-3680e65 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2017 License: MIT Imports: 5 Imported by: 3

Documentation

Overview

Package server is a generated protocol buffer package.

It is generated from these files:

proto/server/server.proto

It has these top-level messages:

CommandRequest
CommandResponse
LogEntry
RequestVoteRequest
RequestVoteResponse
AppendEntriesRequest
AppendEntriesResponse
Peer
Host
RaftGroup
ServerConfig
ApproveAppendResponse
GroupId
GroupNodesResponse
GroupMember
GroupMembersResponse
PullGroupLogsResuest
LogEntries
NodeJoinGroupEntry
GroupLeader
GroupInvitation
RaftGroupNodes
Nothing

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterBFTRaftServer

func RegisterBFTRaftServer(s *grpc.Server, srv BFTRaftServer)

Types

type AppendEntriesRequest

type AppendEntriesRequest struct {
	Group        uint64                 `protobuf:"varint,1,opt,name=group" json:"group,omitempty"`
	Term         uint64                 `protobuf:"varint,2,opt,name=term" json:"term,omitempty"`
	LeaderId     uint64                 `protobuf:"varint,3,opt,name=leader_id,json=leaderId" json:"leader_id,omitempty"`
	PrevLogIndex uint64                 `protobuf:"varint,4,opt,name=prev_log_index,json=prevLogIndex" json:"prev_log_index,omitempty"`
	PrevLogTerm  uint64                 `protobuf:"varint,5,opt,name=prev_log_term,json=prevLogTerm" json:"prev_log_term,omitempty"`
	Signature    []byte                 `protobuf:"bytes,6,opt,name=signature,proto3" json:"signature,omitempty"`
	QuorumVotes  []*RequestVoteResponse `protobuf:"bytes,7,rep,name=quorum_votes,json=quorumVotes" json:"quorum_votes,omitempty"`
	Entries      []*LogEntry            `protobuf:"bytes,8,rep,name=entries" json:"entries,omitempty"`
}

func (*AppendEntriesRequest) Descriptor

func (*AppendEntriesRequest) Descriptor() ([]byte, []int)

func (*AppendEntriesRequest) GetEntries

func (m *AppendEntriesRequest) GetEntries() []*LogEntry

func (*AppendEntriesRequest) GetGroup

func (m *AppendEntriesRequest) GetGroup() uint64

func (*AppendEntriesRequest) GetLeaderId

func (m *AppendEntriesRequest) GetLeaderId() uint64

func (*AppendEntriesRequest) GetPrevLogIndex

func (m *AppendEntriesRequest) GetPrevLogIndex() uint64

func (*AppendEntriesRequest) GetPrevLogTerm

func (m *AppendEntriesRequest) GetPrevLogTerm() uint64

func (*AppendEntriesRequest) GetQuorumVotes

func (m *AppendEntriesRequest) GetQuorumVotes() []*RequestVoteResponse

func (*AppendEntriesRequest) GetSignature

func (m *AppendEntriesRequest) GetSignature() []byte

func (*AppendEntriesRequest) GetTerm

func (m *AppendEntriesRequest) GetTerm() uint64

func (*AppendEntriesRequest) ProtoMessage

func (*AppendEntriesRequest) ProtoMessage()

func (*AppendEntriesRequest) Reset

func (m *AppendEntriesRequest) Reset()

func (*AppendEntriesRequest) String

func (m *AppendEntriesRequest) String() string

type AppendEntriesResponse

type AppendEntriesResponse struct {
	Group     uint64 `protobuf:"varint,1,opt,name=group" json:"group,omitempty"`
	Term      uint64 `protobuf:"varint,2,opt,name=term" json:"term,omitempty"`
	Index     uint64 `protobuf:"varint,3,opt,name=index" json:"index,omitempty"`
	Peer      uint64 `protobuf:"varint,4,opt,name=peer" json:"peer,omitempty"`
	Successed bool   `protobuf:"varint,5,opt,name=successed" json:"successed,omitempty"`
	Convinced bool   `protobuf:"varint,6,opt,name=convinced" json:"convinced,omitempty"`
	Hash      []byte `protobuf:"bytes,7,opt,name=hash,proto3" json:"hash,omitempty"`
	Signature []byte `protobuf:"bytes,8,opt,name=signature,proto3" json:"signature,omitempty"`
}

func (*AppendEntriesResponse) Descriptor

func (*AppendEntriesResponse) Descriptor() ([]byte, []int)

func (*AppendEntriesResponse) GetConvinced

func (m *AppendEntriesResponse) GetConvinced() bool

func (*AppendEntriesResponse) GetGroup

func (m *AppendEntriesResponse) GetGroup() uint64

func (*AppendEntriesResponse) GetHash

func (m *AppendEntriesResponse) GetHash() []byte

func (*AppendEntriesResponse) GetIndex

func (m *AppendEntriesResponse) GetIndex() uint64

func (*AppendEntriesResponse) GetPeer

func (m *AppendEntriesResponse) GetPeer() uint64

func (*AppendEntriesResponse) GetSignature

func (m *AppendEntriesResponse) GetSignature() []byte

func (*AppendEntriesResponse) GetSuccessed

func (m *AppendEntriesResponse) GetSuccessed() bool

func (*AppendEntriesResponse) GetTerm

func (m *AppendEntriesResponse) GetTerm() uint64

func (*AppendEntriesResponse) ProtoMessage

func (*AppendEntriesResponse) ProtoMessage()

func (*AppendEntriesResponse) Reset

func (m *AppendEntriesResponse) Reset()

func (*AppendEntriesResponse) String

func (m *AppendEntriesResponse) String() string

type ApproveAppendResponse

type ApproveAppendResponse struct {
	Group     uint64 `protobuf:"varint,1,opt,name=group" json:"group,omitempty"`
	Peer      uint64 `protobuf:"varint,2,opt,name=peer" json:"peer,omitempty"`
	Index     uint64 `protobuf:"varint,3,opt,name=index" json:"index,omitempty"`
	Appended  bool   `protobuf:"varint,4,opt,name=appended" json:"appended,omitempty"`
	Delayed   bool   `protobuf:"varint,5,opt,name=delayed" json:"delayed,omitempty"`
	Failed    bool   `protobuf:"varint,6,opt,name=failed" json:"failed,omitempty"`
	Signature []byte `protobuf:"bytes,7,opt,name=signature,proto3" json:"signature,omitempty"`
}

func (*ApproveAppendResponse) Descriptor

func (*ApproveAppendResponse) Descriptor() ([]byte, []int)

func (*ApproveAppendResponse) GetAppended

func (m *ApproveAppendResponse) GetAppended() bool

func (*ApproveAppendResponse) GetDelayed

func (m *ApproveAppendResponse) GetDelayed() bool

func (*ApproveAppendResponse) GetFailed

func (m *ApproveAppendResponse) GetFailed() bool

func (*ApproveAppendResponse) GetGroup

func (m *ApproveAppendResponse) GetGroup() uint64

func (*ApproveAppendResponse) GetIndex

func (m *ApproveAppendResponse) GetIndex() uint64

func (*ApproveAppendResponse) GetPeer

func (m *ApproveAppendResponse) GetPeer() uint64

func (*ApproveAppendResponse) GetSignature

func (m *ApproveAppendResponse) GetSignature() []byte

func (*ApproveAppendResponse) ProtoMessage

func (*ApproveAppendResponse) ProtoMessage()

func (*ApproveAppendResponse) Reset

func (m *ApproveAppendResponse) Reset()

func (*ApproveAppendResponse) String

func (m *ApproveAppendResponse) String() string

type BFTRaftClient

type BFTRaftClient interface {
	ExecCommand(ctx context.Context, in *CommandRequest, opts ...grpc.CallOption) (*CommandResponse, error)
	RequestVote(ctx context.Context, in *RequestVoteRequest, opts ...grpc.CallOption) (*RequestVoteResponse, error)
	AppendEntries(ctx context.Context, in *AppendEntriesRequest, opts ...grpc.CallOption) (*AppendEntriesResponse, error)
	ApproveAppend(ctx context.Context, in *AppendEntriesResponse, opts ...grpc.CallOption) (*ApproveAppendResponse, error)
	GroupHosts(ctx context.Context, in *GroupId, opts ...grpc.CallOption) (*GroupNodesResponse, error)
	GroupMembers(ctx context.Context, in *GroupId, opts ...grpc.CallOption) (*GroupMembersResponse, error)
	GetGroupLeader(ctx context.Context, in *GroupId, opts ...grpc.CallOption) (*GroupLeader, error)
	GetGroupContent(ctx context.Context, in *GroupId, opts ...grpc.CallOption) (*RaftGroup, error)
	PullGroupLogs(ctx context.Context, in *PullGroupLogsResuest, opts ...grpc.CallOption) (*LogEntries, error)
	SendGroupInvitation(ctx context.Context, in *GroupInvitation, opts ...grpc.CallOption) (*Nothing, error)
}

func NewBFTRaftClient

func NewBFTRaftClient(cc *grpc.ClientConn) BFTRaftClient

type CommandRequest

type CommandRequest struct {
	Group     uint64 `protobuf:"varint,1,opt,name=group" json:"group,omitempty"`
	ClientId  uint64 `protobuf:"varint,2,opt,name=client_id,json=clientId" json:"client_id,omitempty"`
	RequestId uint64 `protobuf:"varint,3,opt,name=request_id,json=requestId" json:"request_id,omitempty"`
	FuncId    uint64 `protobuf:"varint,4,opt,name=func_id,json=funcId" json:"func_id,omitempty"`
	Signature []byte `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty"`
	Arg       []byte `protobuf:"bytes,6,opt,name=arg,proto3" json:"arg,omitempty"`
}

func (*CommandRequest) Descriptor

func (*CommandRequest) Descriptor() ([]byte, []int)

func (*CommandRequest) GetArg

func (m *CommandRequest) GetArg() []byte

func (*CommandRequest) GetClientId

func (m *CommandRequest) GetClientId() uint64

func (*CommandRequest) GetFuncId

func (m *CommandRequest) GetFuncId() uint64

func (*CommandRequest) GetGroup

func (m *CommandRequest) GetGroup() uint64

func (*CommandRequest) GetRequestId

func (m *CommandRequest) GetRequestId() uint64

func (*CommandRequest) GetSignature

func (m *CommandRequest) GetSignature() []byte

func (*CommandRequest) ProtoMessage

func (*CommandRequest) ProtoMessage()

func (*CommandRequest) Reset

func (m *CommandRequest) Reset()

func (*CommandRequest) String

func (m *CommandRequest) String() string

type CommandResponse

type CommandResponse struct {
	Group     uint64 `protobuf:"varint,1,opt,name=group" json:"group,omitempty"`
	LeaderId  uint64 `protobuf:"varint,2,opt,name=leader_id,json=leaderId" json:"leader_id,omitempty"`
	NodeId    uint64 `protobuf:"varint,3,opt,name=node_id,json=nodeId" json:"node_id,omitempty"`
	RequestId uint64 `protobuf:"varint,4,opt,name=request_id,json=requestId" json:"request_id,omitempty"`
	Signature []byte `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty"`
	Result    []byte `protobuf:"bytes,6,opt,name=result,proto3" json:"result,omitempty"`
}

func (*CommandResponse) Descriptor

func (*CommandResponse) Descriptor() ([]byte, []int)

func (*CommandResponse) GetGroup

func (m *CommandResponse) GetGroup() uint64

func (*CommandResponse) GetLeaderId

func (m *CommandResponse) GetLeaderId() uint64

func (*CommandResponse) GetNodeId

func (m *CommandResponse) GetNodeId() uint64

func (*CommandResponse) GetRequestId

func (m *CommandResponse) GetRequestId() uint64

func (*CommandResponse) GetResult

func (m *CommandResponse) GetResult() []byte

func (*CommandResponse) GetSignature

func (m *CommandResponse) GetSignature() []byte

func (*CommandResponse) ProtoMessage

func (*CommandResponse) ProtoMessage()

func (*CommandResponse) Reset

func (m *CommandResponse) Reset()

func (*CommandResponse) String

func (m *CommandResponse) String() string

type GroupId

type GroupId struct {
	GroupId uint64 `protobuf:"varint,1,opt,name=group_id,json=groupId" json:"group_id,omitempty"`
}

func (*GroupId) Descriptor

func (*GroupId) Descriptor() ([]byte, []int)

func (*GroupId) GetGroupId

func (m *GroupId) GetGroupId() uint64

func (*GroupId) ProtoMessage

func (*GroupId) ProtoMessage()

func (*GroupId) Reset

func (m *GroupId) Reset()

func (*GroupId) String

func (m *GroupId) String() string

type GroupInvitation

type GroupInvitation struct {
	Group     uint64 `protobuf:"varint,1,opt,name=group" json:"group,omitempty"`
	Leader    uint64 `protobuf:"varint,2,opt,name=leader" json:"leader,omitempty"`
	Node      uint64 `protobuf:"varint,3,opt,name=node" json:"node,omitempty"`
	Signature []byte `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"`
}

func (*GroupInvitation) Descriptor

func (*GroupInvitation) Descriptor() ([]byte, []int)

func (*GroupInvitation) GetGroup

func (m *GroupInvitation) GetGroup() uint64

func (*GroupInvitation) GetLeader

func (m *GroupInvitation) GetLeader() uint64

func (*GroupInvitation) GetNode

func (m *GroupInvitation) GetNode() uint64

func (*GroupInvitation) GetSignature

func (m *GroupInvitation) GetSignature() []byte

func (*GroupInvitation) ProtoMessage

func (*GroupInvitation) ProtoMessage()

func (*GroupInvitation) Reset

func (m *GroupInvitation) Reset()

func (*GroupInvitation) String

func (m *GroupInvitation) String() string

type GroupLeader

type GroupLeader struct {
	Node      *Host  `protobuf:"bytes,1,opt,name=node" json:"node,omitempty"`
	Accuate   bool   `protobuf:"varint,2,opt,name=Accuate" json:"Accuate,omitempty"`
	Signature []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"`
}

func (*GroupLeader) Descriptor

func (*GroupLeader) Descriptor() ([]byte, []int)

func (*GroupLeader) GetAccuate

func (m *GroupLeader) GetAccuate() bool

func (*GroupLeader) GetNode

func (m *GroupLeader) GetNode() *Host

func (*GroupLeader) GetSignature

func (m *GroupLeader) GetSignature() []byte

func (*GroupLeader) ProtoMessage

func (*GroupLeader) ProtoMessage()

func (*GroupLeader) Reset

func (m *GroupLeader) Reset()

func (*GroupLeader) String

func (m *GroupLeader) String() string

type GroupMember

type GroupMember struct {
	Host *Host `protobuf:"bytes,1,opt,name=host" json:"host,omitempty"`
	Peer *Peer `protobuf:"bytes,2,opt,name=peer" json:"peer,omitempty"`
}

func (*GroupMember) Descriptor

func (*GroupMember) Descriptor() ([]byte, []int)

func (*GroupMember) GetHost

func (m *GroupMember) GetHost() *Host

func (*GroupMember) GetPeer

func (m *GroupMember) GetPeer() *Peer

func (*GroupMember) ProtoMessage

func (*GroupMember) ProtoMessage()

func (*GroupMember) Reset

func (m *GroupMember) Reset()

func (*GroupMember) String

func (m *GroupMember) String() string

type GroupMembersResponse

type GroupMembersResponse struct {
	LastEntry *LogEntry      `protobuf:"bytes,2,opt,name=last_entry,json=lastEntry" json:"last_entry,omitempty"`
	Members   []*GroupMember `protobuf:"bytes,3,rep,name=members" json:"members,omitempty"`
	Signature []byte         `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"`
}

func (*GroupMembersResponse) Descriptor

func (*GroupMembersResponse) Descriptor() ([]byte, []int)

func (*GroupMembersResponse) GetLastEntry

func (m *GroupMembersResponse) GetLastEntry() *LogEntry

func (*GroupMembersResponse) GetMembers

func (m *GroupMembersResponse) GetMembers() []*GroupMember

func (*GroupMembersResponse) GetSignature

func (m *GroupMembersResponse) GetSignature() []byte

func (*GroupMembersResponse) ProtoMessage

func (*GroupMembersResponse) ProtoMessage()

func (*GroupMembersResponse) Reset

func (m *GroupMembersResponse) Reset()

func (*GroupMembersResponse) String

func (m *GroupMembersResponse) String() string

type GroupNodesResponse

type GroupNodesResponse struct {
	Nodes     []*Host `protobuf:"bytes,1,rep,name=nodes" json:"nodes,omitempty"`
	Signature []byte  `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
}

func (*GroupNodesResponse) Descriptor

func (*GroupNodesResponse) Descriptor() ([]byte, []int)

func (*GroupNodesResponse) GetNodes

func (m *GroupNodesResponse) GetNodes() []*Host

func (*GroupNodesResponse) GetSignature

func (m *GroupNodesResponse) GetSignature() []byte

func (*GroupNodesResponse) ProtoMessage

func (*GroupNodesResponse) ProtoMessage()

func (*GroupNodesResponse) Reset

func (m *GroupNodesResponse) Reset()

func (*GroupNodesResponse) String

func (m *GroupNodesResponse) String() string

type Host

type Host struct {
	Id         uint64 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
	LastSeen   uint64 `protobuf:"varint,2,opt,name=last_seen,json=lastSeen" json:"last_seen,omitempty"`
	Online     bool   `protobuf:"varint,3,opt,name=online" json:"online,omitempty"`
	ServerAddr string `protobuf:"bytes,4,opt,name=server_addr,json=serverAddr" json:"server_addr,omitempty"`
	PublicKey  []byte `protobuf:"bytes,5,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
}

func (*Host) Descriptor

func (*Host) Descriptor() ([]byte, []int)

func (*Host) GetId

func (m *Host) GetId() uint64

func (*Host) GetLastSeen

func (m *Host) GetLastSeen() uint64

func (*Host) GetOnline

func (m *Host) GetOnline() bool

func (*Host) GetPublicKey

func (m *Host) GetPublicKey() []byte

func (*Host) GetServerAddr

func (m *Host) GetServerAddr() string

func (*Host) ProtoMessage

func (*Host) ProtoMessage()

func (*Host) Reset

func (m *Host) Reset()

func (*Host) String

func (m *Host) String() string

type LogEntries

type LogEntries struct {
	Entries   []*LogEntry `protobuf:"bytes,1,rep,name=entries" json:"entries,omitempty"`
	Signature []byte      `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
}

func (*LogEntries) Descriptor

func (*LogEntries) Descriptor() ([]byte, []int)

func (*LogEntries) GetEntries

func (m *LogEntries) GetEntries() []*LogEntry

func (*LogEntries) GetSignature

func (m *LogEntries) GetSignature() []byte

func (*LogEntries) ProtoMessage

func (*LogEntries) ProtoMessage()

func (*LogEntries) Reset

func (m *LogEntries) Reset()

func (*LogEntries) String

func (m *LogEntries) String() string

type LogEntry

type LogEntry struct {
	Term    uint64          `protobuf:"varint,1,opt,name=term" json:"term,omitempty"`
	Index   uint64          `protobuf:"varint,2,opt,name=index" json:"index,omitempty"`
	Hash    []byte          `protobuf:"bytes,3,opt,name=hash,proto3" json:"hash,omitempty"`
	Command *CommandRequest `protobuf:"bytes,4,opt,name=command" json:"command,omitempty"`
}

func (*LogEntry) Descriptor

func (*LogEntry) Descriptor() ([]byte, []int)

func (*LogEntry) GetCommand

func (m *LogEntry) GetCommand() *CommandRequest

func (*LogEntry) GetHash

func (m *LogEntry) GetHash() []byte

func (*LogEntry) GetIndex

func (m *LogEntry) GetIndex() uint64

func (*LogEntry) GetTerm

func (m *LogEntry) GetTerm() uint64

func (*LogEntry) ProtoMessage

func (*LogEntry) ProtoMessage()

func (*LogEntry) Reset

func (m *LogEntry) Reset()

func (*LogEntry) String

func (m *LogEntry) String() string

type NodeJoinGroupEntry

type NodeJoinGroupEntry struct {
	Group uint64 `protobuf:"varint,1,opt,name=group" json:"group,omitempty"`
}

func (*NodeJoinGroupEntry) Descriptor

func (*NodeJoinGroupEntry) Descriptor() ([]byte, []int)

func (*NodeJoinGroupEntry) GetGroup

func (m *NodeJoinGroupEntry) GetGroup() uint64

func (*NodeJoinGroupEntry) ProtoMessage

func (*NodeJoinGroupEntry) ProtoMessage()

func (*NodeJoinGroupEntry) Reset

func (m *NodeJoinGroupEntry) Reset()

func (*NodeJoinGroupEntry) String

func (m *NodeJoinGroupEntry) String() string

type Nothing

type Nothing struct {
}

func (*Nothing) Descriptor

func (*Nothing) Descriptor() ([]byte, []int)

func (*Nothing) ProtoMessage

func (*Nothing) ProtoMessage()

func (*Nothing) Reset

func (m *Nothing) Reset()

func (*Nothing) String

func (m *Nothing) String() string

type Peer

type Peer struct {
	Id         uint64 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
	Group      uint64 `protobuf:"varint,2,opt,name=group" json:"group,omitempty"`
	NextIndex  uint64 `protobuf:"varint,4,opt,name=next_index,json=nextIndex" json:"next_index,omitempty"`
	MatchIndex uint64 `protobuf:"varint,5,opt,name=match_index,json=matchIndex" json:"match_index,omitempty"`
}

func (*Peer) Descriptor

func (*Peer) Descriptor() ([]byte, []int)

func (*Peer) GetGroup

func (m *Peer) GetGroup() uint64

func (*Peer) GetId

func (m *Peer) GetId() uint64

func (*Peer) GetMatchIndex

func (m *Peer) GetMatchIndex() uint64

func (*Peer) GetNextIndex

func (m *Peer) GetNextIndex() uint64

func (*Peer) ProtoMessage

func (*Peer) ProtoMessage()

func (*Peer) Reset

func (m *Peer) Reset()

func (*Peer) String

func (m *Peer) String() string

type PullGroupLogsResuest

type PullGroupLogsResuest struct {
	Group uint64 `protobuf:"varint,1,opt,name=group" json:"group,omitempty"`
	Index uint64 `protobuf:"varint,2,opt,name=index" json:"index,omitempty"`
}

func (*PullGroupLogsResuest) Descriptor

func (*PullGroupLogsResuest) Descriptor() ([]byte, []int)

func (*PullGroupLogsResuest) GetGroup

func (m *PullGroupLogsResuest) GetGroup() uint64

func (*PullGroupLogsResuest) GetIndex

func (m *PullGroupLogsResuest) GetIndex() uint64

func (*PullGroupLogsResuest) ProtoMessage

func (*PullGroupLogsResuest) ProtoMessage()

func (*PullGroupLogsResuest) Reset

func (m *PullGroupLogsResuest) Reset()

func (*PullGroupLogsResuest) String

func (m *PullGroupLogsResuest) String() string

type RaftGroup

type RaftGroup struct {
	Replications uint32 `protobuf:"varint,1,opt,name=replications" json:"replications,omitempty"`
	Id           uint64 `protobuf:"varint,2,opt,name=id" json:"id,omitempty"`
	Term         uint64 `protobuf:"varint,4,opt,name=term" json:"term,omitempty"`
}

func (*RaftGroup) Descriptor

func (*RaftGroup) Descriptor() ([]byte, []int)

func (*RaftGroup) GetId

func (m *RaftGroup) GetId() uint64

func (*RaftGroup) GetReplications

func (m *RaftGroup) GetReplications() uint32

func (*RaftGroup) GetTerm

func (m *RaftGroup) GetTerm() uint64

func (*RaftGroup) ProtoMessage

func (*RaftGroup) ProtoMessage()

func (*RaftGroup) Reset

func (m *RaftGroup) Reset()

func (*RaftGroup) String

func (m *RaftGroup) String() string

type RaftGroupNodes

type RaftGroupNodes struct {
	Nodes []*Host `protobuf:"bytes,1,rep,name=nodes" json:"nodes,omitempty"`
}

func (*RaftGroupNodes) Descriptor

func (*RaftGroupNodes) Descriptor() ([]byte, []int)

func (*RaftGroupNodes) GetNodes

func (m *RaftGroupNodes) GetNodes() []*Host

func (*RaftGroupNodes) ProtoMessage

func (*RaftGroupNodes) ProtoMessage()

func (*RaftGroupNodes) Reset

func (m *RaftGroupNodes) Reset()

func (*RaftGroupNodes) String

func (m *RaftGroupNodes) String() string

type RequestVoteRequest

type RequestVoteRequest struct {
	Group       uint64 `protobuf:"varint,1,opt,name=group" json:"group,omitempty"`
	Term        uint64 `protobuf:"varint,2,opt,name=term" json:"term,omitempty"`
	LogIndex    uint64 `protobuf:"varint,3,opt,name=log_index,json=logIndex" json:"log_index,omitempty"`
	LogTerm     uint64 `protobuf:"varint,4,opt,name=log_term,json=logTerm" json:"log_term,omitempty"`
	CandidateId uint64 `protobuf:"varint,5,opt,name=candidate_id,json=candidateId" json:"candidate_id,omitempty"`
	Signature   []byte `protobuf:"bytes,6,opt,name=signature,proto3" json:"signature,omitempty"`
}

func (*RequestVoteRequest) Descriptor

func (*RequestVoteRequest) Descriptor() ([]byte, []int)

func (*RequestVoteRequest) GetCandidateId

func (m *RequestVoteRequest) GetCandidateId() uint64

func (*RequestVoteRequest) GetGroup

func (m *RequestVoteRequest) GetGroup() uint64

func (*RequestVoteRequest) GetLogIndex

func (m *RequestVoteRequest) GetLogIndex() uint64

func (*RequestVoteRequest) GetLogTerm

func (m *RequestVoteRequest) GetLogTerm() uint64

func (*RequestVoteRequest) GetSignature

func (m *RequestVoteRequest) GetSignature() []byte

func (*RequestVoteRequest) GetTerm

func (m *RequestVoteRequest) GetTerm() uint64

func (*RequestVoteRequest) ProtoMessage

func (*RequestVoteRequest) ProtoMessage()

func (*RequestVoteRequest) Reset

func (m *RequestVoteRequest) Reset()

func (*RequestVoteRequest) String

func (m *RequestVoteRequest) String() string

type RequestVoteResponse

type RequestVoteResponse struct {
	Group       uint64 `protobuf:"varint,1,opt,name=group" json:"group,omitempty"`
	Term        uint64 `protobuf:"varint,2,opt,name=term" json:"term,omitempty"`
	LogIndex    uint64 `protobuf:"varint,3,opt,name=log_index,json=logIndex" json:"log_index,omitempty"`
	CandidateId uint64 `protobuf:"varint,5,opt,name=candidate_id,json=candidateId" json:"candidate_id,omitempty"`
	Voter       uint64 `protobuf:"varint,6,opt,name=voter" json:"voter,omitempty"`
	Granted     bool   `protobuf:"varint,7,opt,name=granted" json:"granted,omitempty"`
	Signature   []byte `protobuf:"bytes,8,opt,name=signature,proto3" json:"signature,omitempty"`
}

func (*RequestVoteResponse) Descriptor

func (*RequestVoteResponse) Descriptor() ([]byte, []int)

func (*RequestVoteResponse) GetCandidateId

func (m *RequestVoteResponse) GetCandidateId() uint64

func (*RequestVoteResponse) GetGranted

func (m *RequestVoteResponse) GetGranted() bool

func (*RequestVoteResponse) GetGroup

func (m *RequestVoteResponse) GetGroup() uint64

func (*RequestVoteResponse) GetLogIndex

func (m *RequestVoteResponse) GetLogIndex() uint64

func (*RequestVoteResponse) GetSignature

func (m *RequestVoteResponse) GetSignature() []byte

func (*RequestVoteResponse) GetTerm

func (m *RequestVoteResponse) GetTerm() uint64

func (*RequestVoteResponse) GetVoter

func (m *RequestVoteResponse) GetVoter() uint64

func (*RequestVoteResponse) ProtoMessage

func (*RequestVoteResponse) ProtoMessage()

func (*RequestVoteResponse) Reset

func (m *RequestVoteResponse) Reset()

func (*RequestVoteResponse) String

func (m *RequestVoteResponse) String() string

type ServerConfig

type ServerConfig struct {
	PrivateKey []byte `protobuf:"bytes,1,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"`
}

func (*ServerConfig) Descriptor

func (*ServerConfig) Descriptor() ([]byte, []int)

func (*ServerConfig) GetPrivateKey

func (m *ServerConfig) GetPrivateKey() []byte

func (*ServerConfig) ProtoMessage

func (*ServerConfig) ProtoMessage()

func (*ServerConfig) Reset

func (m *ServerConfig) Reset()

func (*ServerConfig) String

func (m *ServerConfig) String() string

Jump to

Keyboard shortcuts

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