peermgr

package
v1.23.0 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2022 License: GPL-3.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PeerManager

type PeerManager interface {
	orderPeerMgr.OrderPeerManager

	orderPeerMgr.TssPeerManager

	// SendWithStream sends message using existed stream
	SendWithStream(network.Stream, *pb.Message) error

	// PierManager
	PierManager() PierManager

	// ReConfig
	ReConfig(config interface{}) error
}

type PierManager added in v1.5.0

type PierManager interface {
	Piers() *Piers

	AskPierMaster(string) (bool, error)
}

type Piers added in v1.5.0

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

func (*Piers) CheckMaster added in v1.5.0

func (p *Piers) CheckMaster(address string) bool

func (*Piers) HasPier added in v1.5.0

func (p *Piers) HasPier(address string) bool

func (*Piers) HeartBeat added in v1.5.0

func (p *Piers) HeartBeat(address string, index string) error

func (*Piers) SetMaster added in v1.5.0

func (p *Piers) SetMaster(address string, index string, timeout int64) error

type Swarm

type Swarm struct {
	Tss tss.Tss
	// contains filtered or unexported fields
}

func New

func New(repoConfig *repo.Repo, logger logrus.FieldLogger, ledger *ledger.Ledger) (*Swarm, error)

func (*Swarm) AddNode added in v1.4.0

func (swarm *Swarm) AddNode(newNodeID uint64, vpInfo *pb.VpInfo)

func (*Swarm) AskPierMaster added in v1.5.0

func (swarm *Swarm) AskPierMaster(address string) (bool, error)

func (*Swarm) AsyncSend

func (swarm *Swarm) AsyncSend(id orderPeerMgr.KeyType, msg *pb.Message) error

func (*Swarm) Broadcast

func (swarm *Swarm) Broadcast(msg *pb.Message) error

func (*Swarm) CountConnectedPeers added in v1.4.0

func (swarm *Swarm) CountConnectedPeers() uint64

func (*Swarm) DelNode added in v1.4.0

func (swarm *Swarm) DelNode(delID uint64)

func (*Swarm) Disconnect added in v1.4.0

func (swarm *Swarm) Disconnect(vpInfos map[uint64]*pb.VpInfo)

func (*Swarm) OrderPeers added in v1.14.0

func (swarm *Swarm) OrderPeers() map[uint64]*pb.VpInfo

func (*Swarm) OtherPeers

func (swarm *Swarm) OtherPeers() map[uint64]*peer.AddrInfo

func (*Swarm) Peers

func (swarm *Swarm) Peers() map[string]*peer.AddrInfo

func (*Swarm) PierManager added in v1.5.0

func (swarm *Swarm) PierManager() PierManager

func (*Swarm) Piers added in v1.5.0

func (swarm *Swarm) Piers() *Piers

func (*Swarm) Ping added in v1.4.0

func (swarm *Swarm) Ping()

func (*Swarm) ReConfig added in v1.6.3

func (swarm *Swarm) ReConfig(config interface{}) error

func (*Swarm) Send

func (swarm *Swarm) Send(id orderPeerMgr.KeyType, msg *pb.Message) (*pb.Message, error)

func (*Swarm) SendWithStream

func (swarm *Swarm) SendWithStream(s network.Stream, msg *pb.Message) error

func (*Swarm) Start

func (swarm *Swarm) Start() error

func (*Swarm) Stop

func (swarm *Swarm) Stop() error

func (*Swarm) SubscribeOrderMessage

func (swarm *Swarm) SubscribeOrderMessage(ch chan<- orderPeerMgr.OrderMessageEvent) event.Subscription

func (*Swarm) SubscribeTssMessage added in v1.22.0

func (swarm *Swarm) SubscribeTssMessage(ch chan<- *pb.Message) event.Subscription

func (*Swarm) SubscribeTssSignRes added in v1.22.0

func (swarm *Swarm) SubscribeTssSignRes(ch chan<- *pb.Message) event.Subscription

func (*Swarm) UpdateRouter added in v1.4.0

func (swarm *Swarm) UpdateRouter(vpInfos map[uint64]*pb.VpInfo, isNew bool) bool

Directories

Path Synopsis
Package mock_peermgr is a generated GoMock package.
Package mock_peermgr is a generated GoMock package.

Jump to

Keyboard shortcuts

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