Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Identity identity.Config Server server.Config Kademlia kademlia.Config Web bootstrapserver.Config Version version.Config }
Config is all the configuration parameters for a Bootstrap Node
type DB ¶
type DB interface { // CreateTables initializes the database CreateTables() error // Close closes the database Close() error // TODO: use better interfaces RoutingTable() (kdb, ndb, adb storage.KeyValueStore) }
DB is the master database for Boostrap Node
type Peer ¶
type Peer struct { // core dependencies Log *zap.Logger Identity *identity.FullIdentity DB DB Transport transport.Client Server *server.Server Version *version.Service // services and endpoints Kademlia struct { RoutingTable *kademlia.RoutingTable Service *kademlia.Kademlia Endpoint *kademlia.Endpoint Inspector *kademlia.Inspector } // Web server with web UI Web struct { Listener net.Listener Service *bootstrapweb.Service Endpoint *bootstrapserver.Server } }
Peer is the representation of a Bootstrap Node.
func New ¶
func New(log *zap.Logger, full *identity.FullIdentity, db DB, config Config, versionInfo version.Info) (*Peer, error)
New creates a new Bootstrap Node.
func (*Peer) Local ¶
func (peer *Peer) Local() overlay.NodeDossier
Local returns the peer local node info.
func (*Peer) PrivateAddr ¶
PrivateAddr returns the private address.
Click to show internal directories.
Click to hide internal directories.