Documentation
¶
Index ¶
Constants ¶
View Source
const HEADER_SIZE int = 8
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientSocket ¶
type ClientSocket interface {
// Send put msg to outbound queue
Send(msg interface{})
// Recv receives a message
Recv() interface{}
Close()
}
func NewClientSocket ¶
type Codec ¶
type Codec interface {
Scheme() string
Encode(msg interface{}) []byte
Decode(data []byte) interface{}
}
Codec interface provide methods for serialization and deserialization
type Message ¶
func NewMessage ¶
type MsgHeader ¶
func NewMsgHeaderFromBytes ¶
type Socket ¶
type Socket interface {
// Send put msg to outbound queue
Send(to ids.ID, msg interface{})
// Multicast send msg to all nodes in the same site
Multicast(zone uint8, msg interface{})
// Broadcast send to all peers within the Replication Region
//zone is the current zone of the node
RBroadcast(zone uint8, msg interface{})
// Broadcast send to all peers
Broadcast(msg interface{})
// Recv receives a message
Recv() interface{}
Close()
GetReplicationGroupZones(zone uint8) []uint8
}
Click to show internal directories.
Click to hide internal directories.