peers

package
v0.10.6 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2021 License: ISC Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Peers

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

func NewPeers

func NewPeers() (*Peers, error)

func (*Peers) APIs

func (p *Peers) APIs() []rpc.API

func (*Peers) Add

func (p *Peers) Add(id string, Addr string)

func (*Peers) All

func (p *Peers) All() []*db.Peer

func (*Peers) Count

func (p *Peers) Count() int

func (*Peers) FindPeerList

func (p *Peers) FindPeerList() []*db.Peer

func (*Peers) LoadPeers

func (p *Peers) LoadPeers()

func (*Peers) Start

func (p *Peers) Start() error

func (*Peers) Stop

func (p *Peers) Stop() error

func (*Peers) UpdateConnectTime

func (p *Peers) UpdateConnectTime(id string, timestamp int64)

func (*Peers) UpdateUnConnected

func (p *Peers) UpdateUnConnected(id string)

type PeersApi

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

func NewPeersApi

func NewPeersApi(peers *Peers) *PeersApi

func (*PeersApi) GetNodeList

func (api *PeersApi) GetNodeList() (interface{}, error)

Jump to

Keyboard shortcuts

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