node

package
v1.2.7 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2021 License: Apache-2.0, MIT Imports: 23 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
}

func (*LocalNode) ChainInfo

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

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 string, leader bool, leaderAddr string, beaconOffset int) *key.Group

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) 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) error
	PrivateAddr() string
	PublicAddr() string
	Index() int
	RunDKG(nodes, thr int, timeout string, leader bool, leaderAddr string, beaconOffset int) *key.Group
	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()
}

func NewLocalNode

func NewLocalNode(i int, period string, base string, tls bool, bindAddr string) Node

func NewNode

func NewNode(i int, period string, base string, tls bool, binary string) Node

type NodeProc

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

func (*NodeProc) ChainInfo

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

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 string, leader bool, leaderAddr string, beaconOffset int) *key.Group

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) error

func (*NodeProc) Stop

func (n *NodeProc) Stop()

func (*NodeProc) UpdateBinary

func (n *NodeProc) UpdateBinary(binary string)

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