Documentation ¶
Index ¶
- type AppendEntriesRequest
- type AppendEntriesResponse
- type ApplyTransactionRequest
- type ApplyTransactionResponse
- type ClientMessage
- type ClientWire
- type DiscoveryRequest
- type DiscoveryResponse
- type ErrorResponse
- type HandshakeIntention
- type HandshakeRequest
- type HandshakeResponse
- type InstallSnapshotRequest
- type InstallSnapshotResponse
- type Message
- type NextObjectIdRequest
- type NextObjectIdResponse
- type RaftClientMessage
- type RaftClientWire
- type RaftServerMessage
- type RaftServerWire
- type RequestVoteRequest
- type RequestVoteResponse
- type RpcClientMessage
- type RpcClientWire
- type RpcServerMessage
- type RpcServerWire
- type ServerMessage
- type ServerWire
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppendEntriesRequest ¶
type AppendEntriesRequest struct {
raft.AppendEntriesRequest
}
func (AppendEntriesRequest) Client ¶
func (AppendEntriesRequest) Client()
func (*AppendEntriesRequest) Decode ¶
func (i *AppendEntriesRequest) Decode(src []byte) error
func (*AppendEntriesRequest) Encode ¶
func (i *AppendEntriesRequest) Encode() []byte
func (AppendEntriesRequest) Raft ¶
func (AppendEntriesRequest) Raft()
type AppendEntriesResponse ¶
type AppendEntriesResponse struct { raft.AppendEntriesResponse Error error }
func (*AppendEntriesResponse) Decode ¶
func (i *AppendEntriesResponse) Decode(src []byte) error
func (*AppendEntriesResponse) Encode ¶
func (i *AppendEntriesResponse) Encode() []byte
func (AppendEntriesResponse) Raft ¶
func (AppendEntriesResponse) Raft()
func (AppendEntriesResponse) Server ¶
func (AppendEntriesResponse) Server()
type ApplyTransactionRequest ¶
type ApplyTransactionRequest struct { NodeID raft.ServerID Transaction *storage.Transaction }
func (ApplyTransactionRequest) Client ¶
func (ApplyTransactionRequest) Client()
func (*ApplyTransactionRequest) Decode ¶
func (i *ApplyTransactionRequest) Decode(src []byte) error
func (*ApplyTransactionRequest) Encode ¶
func (i *ApplyTransactionRequest) Encode() []byte
func (ApplyTransactionRequest) RPC ¶
func (ApplyTransactionRequest) RPC()
type ApplyTransactionResponse ¶
type ApplyTransactionResponse struct{}
func (ApplyTransactionResponse) Decode ¶
func (ApplyTransactionResponse) Decode(src []byte) error
func (ApplyTransactionResponse) Encode ¶
func (ApplyTransactionResponse) Encode() []byte
func (ApplyTransactionResponse) RPC ¶
func (ApplyTransactionResponse) RPC()
func (ApplyTransactionResponse) Server ¶
func (ApplyTransactionResponse) Server()
type ClientMessage ¶
type ClientMessage interface { Message Client() }
type ClientWire ¶
type ClientWire interface { Send(msg ClientMessage) error Receive() (ServerMessage, error) HandshakeRaft() error HandshakeRpc() error }
func NewClientWire ¶
func NewClientWire(r io.ReadCloser, w io.WriteCloser) ClientWire
type DiscoveryRequest ¶
func (DiscoveryRequest) Client ¶
func (DiscoveryRequest) Client()
func (*DiscoveryRequest) Decode ¶
func (i *DiscoveryRequest) Decode(src []byte) error
func (*DiscoveryRequest) Encode ¶
func (i *DiscoveryRequest) Encode() []byte
func (DiscoveryRequest) RPC ¶
func (DiscoveryRequest) RPC()
type DiscoveryResponse ¶
type DiscoveryResponse struct { NodeID raft.ServerID IsNewNode bool Peers []raft.ServerAddress Leader raft.ServerAddress }
func (*DiscoveryResponse) Decode ¶
func (i *DiscoveryResponse) Decode(src []byte) error
func (*DiscoveryResponse) Encode ¶
func (i *DiscoveryResponse) Encode() []byte
func (DiscoveryResponse) RPC ¶
func (DiscoveryResponse) RPC()
func (DiscoveryResponse) Server ¶
func (DiscoveryResponse) Server()
type ErrorResponse ¶
type ErrorResponse struct {
Error error
}
func (*ErrorResponse) Decode ¶
func (i *ErrorResponse) Decode(src []byte) error
func (*ErrorResponse) Encode ¶
func (i *ErrorResponse) Encode() []byte
func (ErrorResponse) RPC ¶
func (ErrorResponse) RPC()
func (ErrorResponse) Raft ¶
func (ErrorResponse) Raft()
func (ErrorResponse) Server ¶
func (ErrorResponse) Server()
type HandshakeIntention ¶
type HandshakeIntention = int32
const ( RaftIntention HandshakeIntention = 1 << iota RpcIntention )
type HandshakeRequest ¶
type HandshakeRequest struct {
Intention HandshakeIntention
}
func (HandshakeRequest) Client ¶
func (HandshakeRequest) Client()
func (*HandshakeRequest) Decode ¶
func (i *HandshakeRequest) Decode(src []byte) error
func (*HandshakeRequest) Encode ¶
func (i *HandshakeRequest) Encode() []byte
type HandshakeResponse ¶
type HandshakeResponse struct{}
func (HandshakeResponse) Decode ¶
func (HandshakeResponse) Decode(src []byte) error
func (HandshakeResponse) Encode ¶
func (HandshakeResponse) Encode() []byte
func (HandshakeResponse) Server ¶
func (HandshakeResponse) Server()
type InstallSnapshotRequest ¶
type InstallSnapshotRequest struct { raft.InstallSnapshotRequest Snapshot []byte }
func (InstallSnapshotRequest) Client ¶
func (InstallSnapshotRequest) Client()
func (*InstallSnapshotRequest) Decode ¶
func (i *InstallSnapshotRequest) Decode(src []byte) error
func (*InstallSnapshotRequest) Encode ¶
func (i *InstallSnapshotRequest) Encode() []byte
func (InstallSnapshotRequest) Raft ¶
func (InstallSnapshotRequest) Raft()
func (*InstallSnapshotRequest) Reader ¶
func (i *InstallSnapshotRequest) Reader() io.Reader
type InstallSnapshotResponse ¶
type InstallSnapshotResponse struct { raft.InstallSnapshotResponse Error error }
func (*InstallSnapshotResponse) Decode ¶
func (i *InstallSnapshotResponse) Decode(src []byte) error
func (*InstallSnapshotResponse) Encode ¶
func (i *InstallSnapshotResponse) Encode() []byte
func (InstallSnapshotResponse) Raft ¶
func (InstallSnapshotResponse) Raft()
func (InstallSnapshotResponse) Server ¶
func (InstallSnapshotResponse) Server()
type NextObjectIdRequest ¶
type NextObjectIdRequest struct {
ObjectPath []byte
}
func (NextObjectIdRequest) Client ¶
func (NextObjectIdRequest) Client()
func (*NextObjectIdRequest) Decode ¶
func (i *NextObjectIdRequest) Decode(src []byte) error
func (*NextObjectIdRequest) Encode ¶
func (i *NextObjectIdRequest) Encode() []byte
func (NextObjectIdRequest) RPC ¶
func (NextObjectIdRequest) RPC()
type NextObjectIdResponse ¶
type NextObjectIdResponse struct {
Identity uint8
}
func (*NextObjectIdResponse) Decode ¶
func (i *NextObjectIdResponse) Decode(src []byte) error
func (*NextObjectIdResponse) Encode ¶
func (i *NextObjectIdResponse) Encode() []byte
func (NextObjectIdResponse) RPC ¶
func (NextObjectIdResponse) RPC()
func (NextObjectIdResponse) Server ¶
func (NextObjectIdResponse) Server()
type RaftClientMessage ¶
type RaftClientMessage interface { ClientMessage Raft() }
type RaftClientWire ¶
type RaftClientWire interface { Send(msg RaftClientMessage) error Receive() (RaftServerMessage, error) }
func NewRaftClientWire ¶
func NewRaftClientWire(r io.ReadCloser, w io.WriteCloser) (RaftClientWire, error)
type RaftServerMessage ¶
type RaftServerMessage interface { ServerMessage Raft() }
type RaftServerWire ¶
type RaftServerWire interface { Send(msg RaftServerMessage) error Receive() (RaftClientMessage, error) }
func NewRaftServerWire ¶
func NewRaftServerWire(r io.ReadCloser, w io.WriteCloser) RaftServerWire
type RequestVoteRequest ¶
type RequestVoteRequest struct {
raft.RequestVoteRequest
}
func (RequestVoteRequest) Client ¶
func (RequestVoteRequest) Client()
func (*RequestVoteRequest) Decode ¶
func (i *RequestVoteRequest) Decode(src []byte) error
func (*RequestVoteRequest) Encode ¶
func (i *RequestVoteRequest) Encode() []byte
func (RequestVoteRequest) Raft ¶
func (RequestVoteRequest) Raft()
type RequestVoteResponse ¶
type RequestVoteResponse struct { raft.RequestVoteResponse Error error }
func (*RequestVoteResponse) Decode ¶
func (i *RequestVoteResponse) Decode(src []byte) error
func (*RequestVoteResponse) Encode ¶
func (i *RequestVoteResponse) Encode() []byte
func (RequestVoteResponse) Raft ¶
func (RequestVoteResponse) Raft()
func (RequestVoteResponse) Server ¶
func (RequestVoteResponse) Server()
type RpcClientMessage ¶
type RpcClientMessage interface { ClientMessage RPC() }
type RpcClientWire ¶
type RpcClientWire interface { Send(msg RpcClientMessage) error Receive() (RpcServerMessage, error) }
func NewRpcClientWire ¶
func NewRpcClientWire(r io.ReadCloser, w io.WriteCloser) (RpcClientWire, error)
type RpcServerMessage ¶
type RpcServerMessage interface { ServerMessage RPC() }
type RpcServerWire ¶
type RpcServerWire interface { Send(msg RpcServerMessage) error Receive() (RpcClientMessage, error) }
func NewRpcServerWire ¶
func NewRpcServerWire(r io.ReadCloser, w io.WriteCloser) RpcServerWire
type ServerMessage ¶
type ServerMessage interface { Message Server() }
type ServerWire ¶
type ServerWire interface { Send(msg ServerMessage) error Receive() (ClientMessage, error) }
func NewServerWire ¶
func NewServerWire(r io.ReadCloser, w io.WriteCloser) ServerWire
Source Files ¶
- append_entries_request.go
- append_entries_response.go
- apply_transaction_request.go
- apply_transaction_response.go
- discovery_request.go
- discovery_response.go
- error_response.go
- handshake_request.go
- handshake_response.go
- install_snapshot_request.go
- install_snapshot_response.go
- messages.go
- next_object_id_request.go
- next_object_id_response.go
- raft_wire.go
- request_vote_request.go
- request_vote_response.go
Click to show internal directories.
Click to hide internal directories.