net

package
v1.26.0-boost Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0, MIT Imports: 23 Imported by: 8

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
	ResourceManager network.ResourceManager
	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(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) NetLimit added in v1.14.0

func (a *NetAPI) NetLimit(ctx context.Context, scope string) (result api.NetLimit, err 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) NetPing added in v1.15.2

func (a *NetAPI) NetPing(ctx context.Context, p peer.ID) (time.Duration, error)

func (*NetAPI) NetProtectAdd added in v1.15.1

func (a *NetAPI) NetProtectAdd(ctx context.Context, peers []peer.ID) error

func (*NetAPI) NetProtectList added in v1.15.1

func (a *NetAPI) NetProtectList(ctx context.Context) (result []peer.ID, err error)

func (*NetAPI) NetProtectRemove added in v1.15.1

func (a *NetAPI) NetProtectRemove(ctx context.Context, peers []peer.ID) error

func (*NetAPI) NetPubsubScores

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

func (*NetAPI) NetSetLimit added in v1.14.0

func (a *NetAPI) NetSetLimit(ctx context.Context, scope string, limit api.NetLimit) error

func (*NetAPI) NetStat added in v1.14.0

func (a *NetAPI) NetStat(ctx context.Context, scope string) (result api.NetStat, err error)

Jump to

Keyboard shortcuts

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