node

package
v1.5.0-testnet Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 30, 2023 License: Apache-2.0, MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LocalNode

type LocalNode struct {
	// contains filtered or unexported fields
}

LocalNode ...

func NewLocalNode

func NewLocalNode(i int, bindAddr string, cfg cfg.Config) *LocalNode

func (*LocalNode) ChainInfo

func (l *LocalNode) ChainInfo(group string) bool

func (*LocalNode) CtrlAddr added in v1.4.6

func (l *LocalNode) CtrlAddr() string

func (*LocalNode) GetBeacon

func (l *LocalNode) GetBeacon(groupPath string, round uint64) (resp *drand.PublicRandResponse, cmd string)

func (*LocalNode) GetGroup

func (l *LocalNode) GetGroup() *key.Group

func (*LocalNode) Index

func (l *LocalNode) Index() int

func (*LocalNode) Ping

func (l *LocalNode) Ping() bool

func (*LocalNode) PrintLog

func (l *LocalNode) PrintLog()

func (*LocalNode) PrivateAddr

func (l *LocalNode) PrivateAddr() string

func (*LocalNode) PublicAddr

func (l *LocalNode) PublicAddr() string

func (*LocalNode) RunDKG

func (l *LocalNode) RunDKG(nodes, thr int, timeout time.Duration, leader bool, leaderAddr string, beaconOffset int) (*key.Group, error)

func (*LocalNode) RunReshare

func (l *LocalNode) RunReshare(nodes, thr int, oldGroup string, timeout string, leader bool, leaderAddr string, beaconOffset int) *key.Group

func (*LocalNode) Start

func (l *LocalNode) Start(certFolder string, dbEngineType chain.StorageType, pgDSN func() string, memDBSize int) error

func (*LocalNode) Stop

func (l *LocalNode) Stop()

func (*LocalNode) WriteCertificate

func (l *LocalNode) WriteCertificate(p string)

func (*LocalNode) WritePublic

func (l *LocalNode) WritePublic(p string)

type Node

type Node interface {
	Start(certFolder string, dbEngineType chain.StorageType, pgDSN func() string, memDBSize int) error
	PrivateAddr() string
	CtrlAddr() string
	PublicAddr() string
	Index() int
	RunDKG(nodes, thr int, timeout time.Duration, leader bool, leaderAddr string, beaconOffset int) (*key.Group, error)
	GetGroup() *key.Group
	RunReshare(nodes, thr int, oldGroup string, timeout string, leader bool, leaderAddr string, beaconOffset int) *key.Group
	ChainInfo(group string) bool
	Ping() bool
	GetBeacon(groupPath string, round uint64) (*drand.PublicRandResponse, string)
	WriteCertificate(path string)
	WritePublic(path string)
	Stop()
	PrintLog()
}

type NodeProc

type NodeProc struct {
	// contains filtered or unexported fields
}

func NewNode

func NewNode(i int, cfg cfg.Config) *NodeProc

func (*NodeProc) ChainInfo

func (n *NodeProc) ChainInfo(group string) bool

func (*NodeProc) CtrlAddr added in v1.4.6

func (n *NodeProc) CtrlAddr() string

func (*NodeProc) GetBeacon

func (n *NodeProc) GetBeacon(groupPath string, round uint64) (*drand.PublicRandResponse, string)

func (*NodeProc) GetGroup

func (n *NodeProc) GetGroup() *key.Group

func (*NodeProc) Index

func (n *NodeProc) Index() int

func (*NodeProc) Ping

func (n *NodeProc) Ping() bool

func (*NodeProc) PrintLog

func (n *NodeProc) PrintLog()

func (*NodeProc) PrivateAddr

func (n *NodeProc) PrivateAddr() string

func (*NodeProc) PublicAddr

func (n *NodeProc) PublicAddr() string

func (*NodeProc) RunDKG

func (n *NodeProc) RunDKG(nodes, thr int, timeout time.Duration, leader bool, leaderAddr string, beaconOffset int) (*key.Group, error)

func (*NodeProc) RunReshare

func (n *NodeProc) RunReshare(nodes, thr int, oldGroup string, timeout string, leader bool, leaderAddr string, beaconOffset int) *key.Group

func (*NodeProc) Start

func (n *NodeProc) Start(certFolder string, dbEngineType chain.StorageType, pgDSN func() string, memDBSize int) error

func (*NodeProc) Stop

func (n *NodeProc) Stop()

func (*NodeProc) UpdateBinary

func (n *NodeProc) UpdateBinary(binary string, isCandidate bool)

UpdateBinary updates the binary this node uses for control, to e.g. simulate an upgrade

func (*NodeProc) WriteCertificate

func (n *NodeProc) WriteCertificate(path string)

func (*NodeProc) WritePublic

func (n *NodeProc) WritePublic(path string)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL