Documentation ¶
Overview ¶
Package bootstrap implements the capability to connect to an existing and online Tinzenite peer network.
TODO: add encryption bootstrap capabilities
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bootstrap ¶
type Bootstrap struct {
// contains filtered or unexported fields
}
Bootstrap is a temporary peer object that allows to bootstrap into an existing Tinzenite network. Also it is CORRECT and DESIRED that a model for a trusted peer +is not stored between runs to allow resetting if something goes wrong.
func Create ¶
Create returns a struct that will allow to bootstrap to an existing Tinzenite network. To actually start bootstrapping call Bootstrap.Start(address).
Path: the absolute path to the directory. localPeerName: the user defined name of this peer. trusted: whether this should be a trusted peer or an encrypted one. f: the callback to call once the bootstrap has successfully run.
func Load ¶
Load tries to load the given directory as a bootstrap object, allowing it to connect to an existing network. To actually start bootstrapping call Bootstrap.Start(address). NOTE: will fail if already connected to other peers!
func (*Bootstrap) IsTrusted ¶
IsTrusted can be used to read whether this bootstrap is creating an encrypted or a trusted peer.
func (*Bootstrap) PrintStatus ¶
PrintStatus returns a formatted string of the peer status.