Documentation
¶
Index ¶
- type GenesisBootstrapper
- type Superviser
- func (s *Superviser) AddPeer(peer string) error
- func (s *Superviser) EnsurePeersByDNS(wantedPeersHostnames []string)
- func (s *Superviser) GetCommand() string
- func (s *Superviser) GetName() string
- func (s *Superviser) LastSeenBlockNum() uint64
- func (s *Superviser) MarshalLogObject(enc zapcore.ObjectEncoder) error
- func (s *Superviser) Monitor()
- func (s *Superviser) ServerID() (string, error)
- func (s *Superviser) UpdateLastBlockSeen(blockNum uint64)
- type TarballBootstrapper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GenesisBootstrapper ¶
type GenesisBootstrapper struct {
// contains filtered or unexported fields
}
GenesisBootstrapper needs to write genesis file, static node file, then run a command like 'geth init'
func NewGenesisBootstrapper ¶
func (*GenesisBootstrapper) Bootstrap ¶
func (b *GenesisBootstrapper) Bootstrap() error
type Superviser ¶
type Superviser struct { *nodemanager.Superviser // contains filtered or unexported fields }
func NewGethSuperviser ¶
func (*Superviser) AddPeer ¶
func (s *Superviser) AddPeer(peer string) error
AddPeer sends a command through IPC socket to connect geth to the given peer
func (*Superviser) EnsurePeersByDNS ¶
func (s *Superviser) EnsurePeersByDNS(wantedPeersHostnames []string)
EnsurePeersByDNS periodically checks IP addresses on the given FQDNs, calls /v1/server_id on port 8080 (or other if specified in hostname) and adds them as peers wantedPeersHostnames can point to the headless service name in k8s
func (*Superviser) GetCommand ¶
func (s *Superviser) GetCommand() string
func (*Superviser) GetName ¶
func (s *Superviser) GetName() string
func (*Superviser) LastSeenBlockNum ¶
func (s *Superviser) LastSeenBlockNum() uint64
func (*Superviser) MarshalLogObject ¶
func (s *Superviser) MarshalLogObject(enc zapcore.ObjectEncoder) error
func (*Superviser) Monitor ¶
func (s *Superviser) Monitor()
Monitor periodically checks the head block num and block time, as well as the enode string (server ID)
func (*Superviser) ServerID ¶
func (s *Superviser) ServerID() (string, error)
func (*Superviser) UpdateLastBlockSeen ¶ added in v1.4.12
func (s *Superviser) UpdateLastBlockSeen(blockNum uint64)
type TarballBootstrapper ¶
type TarballBootstrapper struct {
// contains filtered or unexported fields
}
func NewTarballBootstrapper ¶
func NewTarballBootstrapper( url string, dataDir string, logger *zap.Logger, ) *TarballBootstrapper
func (*TarballBootstrapper) Bootstrap ¶
func (b *TarballBootstrapper) Bootstrap() error
Click to show internal directories.
Click to hide internal directories.