Documentation ¶
Overview ¶
Package pastry contains a simplified version of Pastry, where proximity is not taken into consideration (i.e. no neighbor set).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Callback ¶
type Callback interface { Deliver(msg *proto.Message, key *big.Int) Forward(msg *proto.Message, key *big.Int) bool }
Callback for events leaving the overlay network.
type Overlay ¶
type Overlay struct {
// contains filtered or unexported fields
}
Internal structure for the overlay state information.
func New ¶
func New(id string, key *rsa.PrivateKey, app Callback) *Overlay
Creates a new overlay structure with all internal state initialized, ready to be booted.
func (*Overlay) Boot ¶
Boots the overlay network: it starts up boostrappers and connection acceptors on all local IPv4 interfaces, after which the overlay management is booted. The method returns the number of remote peers after convergence is reached.
Click to show internal directories.
Click to hide internal directories.