Documentation ¶
Overview ¶
Package messages defines interface for the protocol messages.
Index ¶
- func AuthenBytes(m Message) []byte
- func Stringify(msg Message) string
- type CertifiedMessage
- type ClientMessage
- type Commit
- type Hello
- type Message
- type MessageImpl
- type MessageLog
- type NewView
- type NewViewCert
- type PeerMessage
- type Prepare
- type ReplicaMessage
- type Reply
- type ReqViewChange
- type Request
- type SignedMessage
- type ViewChange
- type ViewChangeCert
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthenBytes ¶
AuthenBytes returns serialized representation of message's authenticated content.
Types ¶
type CertifiedMessage ¶
type CertifiedMessage interface { ReplicaMessage UI() *usig.UI SetUI(ui *usig.UI) }
CertifiedMessage represents a message certified with a UI.
type ClientMessage ¶
ClientMessage represents a message generated by a client.
type Commit ¶
type Commit interface { CertifiedMessage Proposal() CertifiedMessage ImplementsPeerMessage() ImplementsCommit() }
type Hello ¶
type Hello interface { PeerMessage ImplementsHello() }
type Message ¶
type Message interface { encoding.BinaryMarshaler }
type MessageImpl ¶
type MessageImpl interface { NewFromBinary(data []byte) (Message, error) NewHello(replicaID uint32) Hello NewRequest(clientID uint32, sequence uint64, operation []byte) Request NewPrepare(replicaID uint32, view uint64, request Request) Prepare NewCommit(replicaID uint32, proposal CertifiedMessage) Commit NewReply(replicaID, clientID uint32, sequence uint64, result []byte) Reply NewReqViewChange(replicaID uint32, newView uint64) ReqViewChange NewViewChange(replicaID uint32, newView uint64, log MessageLog, vcCert ViewChangeCert) ViewChange NewNewView(replicaID uint32, newView uint64, nvCert NewViewCert) NewView }
MessageImpl provides an implementation of the message representation.
type MessageLog ¶
type MessageLog []CertifiedMessage
type NewView ¶
type NewView interface { CertifiedMessage NewView() uint64 NewViewCert() NewViewCert ImplementsPeerMessage() ImplementsNewView() }
type NewViewCert ¶
type NewViewCert []ViewChange
type PeerMessage ¶
type PeerMessage interface { ReplicaMessage ImplementsPeerMessage() }
PeerMessage represents a message exchanged between replicas.
type Prepare ¶
type Prepare interface { CertifiedMessage View() uint64 Request() Request ImplementsPeerMessage() ImplementsPrepare() }
type ReplicaMessage ¶
ReplicaMessage represents a message generated by a replica.
EmbeddedMessages method returns a sequence of messages embedded into this one.
type Reply ¶
type Reply interface { ReplicaMessage SignedMessage ClientID() uint32 Sequence() uint64 Result() []byte ImplementsReply() }
type ReqViewChange ¶
type ReqViewChange interface { ReplicaMessage SignedMessage NewView() uint64 ImplementsPeerMessage() ImplementsReqViewChange() }
type Request ¶
type Request interface { ClientMessage SignedMessage Sequence() uint64 Operation() []byte ImplementsRequest() }
type SignedMessage ¶
SignedMessage represents a message signed with a normal signature.
type ViewChange ¶
type ViewChange interface { CertifiedMessage NewView() uint64 MessageLog() MessageLog ViewChangeCert() ViewChangeCert ImplementsPeerMessage() ImplementsViewChange() }
type ViewChangeCert ¶
type ViewChangeCert []ReqViewChange
Directories ¶
Path | Synopsis |
---|---|
Package mock_messages is a generated GoMock package.
|
Package mock_messages is a generated GoMock package. |
Package protobuf implements protocol message interface using Protocol Buffers as serialization mechanism.
|
Package protobuf implements protocol message interface using Protocol Buffers as serialization mechanism. |
Click to show internal directories.
Click to hide internal directories.