Documentation
¶
Overview ¶
Package dsnet implements a distributed systems networking library. It provides a Node type for sending and receiving messages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseMessage ¶
type BaseMessage struct {
From string `json:"from"`
To string `json:"to"`
Type string `json:"type"`
}
BaseMessage represents the basic structure of a DSNet message.
type Event ¶
type Event struct {
From string
To string
Type string
Payload []byte
VectorClock map[string]uint64
}
Event represents a message sent or received by a DSNet node.
type Node ¶
Node represents a DSNet node that can send and receive messages.
func NewNode ¶
NewNode creates a new DSNet node and connects it to the controller at the specified address. It performs a handshake with the controller upon creation.
Click to show internal directories.
Click to hide internal directories.