net

package
v1.12.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2021 License: Apache-2.0, MIT Imports: 20 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NetAPI

type NetAPI struct {
	fx.In

	RawHost   lp2p.RawHost
	Host      host.Host
	Router    lp2p.BaseIpfsRouting
	ConnGater *conngater.BasicConnectionGater
	Reporter  metrics.Reporter
	Sk        *dtypes.ScoreKeeper
}

func (*NetAPI) ID

func (a *NetAPI) ID(context.Context) (peer.ID, error)

func (*NetAPI) NetAddrsListen

func (a *NetAPI) NetAddrsListen(context.Context) (peer.AddrInfo, error)

func (*NetAPI) NetAgentVersion

func (a *NetAPI) NetAgentVersion(ctx context.Context, p peer.ID) (string, error)

func (*NetAPI) NetAutoNatStatus

func (a *NetAPI) NetAutoNatStatus(ctx context.Context) (i api.NatInfo, err error)

func (*NetAPI) NetBandwidthStats

func (a *NetAPI) NetBandwidthStats(ctx context.Context) (metrics.Stats, error)

func (*NetAPI) NetBandwidthStatsByPeer

func (a *NetAPI) NetBandwidthStatsByPeer(ctx context.Context) (map[string]metrics.Stats, error)

func (*NetAPI) NetBandwidthStatsByProtocol

func (a *NetAPI) NetBandwidthStatsByProtocol(ctx context.Context) (map[protocol.ID]metrics.Stats, error)

func (*NetAPI) NetBlockAdd

func (a *NetAPI) NetBlockAdd(ctx context.Context, acl api.NetBlockList) error

func (*NetAPI) NetBlockList

func (a *NetAPI) NetBlockList(ctx context.Context) (result api.NetBlockList, err error)

func (*NetAPI) NetBlockRemove

func (a *NetAPI) NetBlockRemove(ctx context.Context, acl api.NetBlockList) error

func (*NetAPI) NetConnect

func (a *NetAPI) NetConnect(ctx context.Context, p peer.AddrInfo) error

func (*NetAPI) NetConnectedness

func (a *NetAPI) NetConnectedness(ctx context.Context, pid peer.ID) (network.Connectedness, error)

func (*NetAPI) NetDisconnect

func (a *NetAPI) NetDisconnect(ctx context.Context, p peer.ID) error

func (*NetAPI) NetFindPeer

func (a *NetAPI) NetFindPeer(ctx context.Context, p peer.ID) (peer.AddrInfo, error)

func (*NetAPI) NetPeerInfo

func (a *NetAPI) NetPeerInfo(_ context.Context, p peer.ID) (*api.ExtendedPeerInfo, error)

func (*NetAPI) NetPeers

func (a *NetAPI) NetPeers(context.Context) ([]peer.AddrInfo, error)

func (*NetAPI) NetPubsubScores

func (a *NetAPI) NetPubsubScores(context.Context) ([]api.PubsubScore, error)

Jump to

Keyboard shortcuts

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