Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrStopped = errors.New("process stopped") ErrDataLength = errors.New("data too long") ErrInvalidSender = errors.New("invalid sender") )
View Source
var ErrInvalidType = errors.New("invalid message type")
Functions ¶
func ValidMessageType ¶
Types ¶
type Message ¶
type Message struct { Type MessageType Data []byte }
func (*Message) MarshalBinary ¶
func (*Message) UnmarshalBinary ¶
type MessageError ¶
type MessageError struct { SenderID string Type MessageType Str string }
func (*MessageError) Error ¶
func (e *MessageError) Error() string
type MessageType ¶
type MessageType byte
const ( Propose MessageType = iota Echo Ready )
func (MessageType) String ¶
func (t MessageType) String() string
type OutMessage ¶
Click to show internal directories.
Click to hide internal directories.