common

package
v1.9.0-rc5 Latest Latest
Warning

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

Go to latest
Published: May 15, 2021 License: Apache-2.0, MIT Imports: 25 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommonAPI

type CommonAPI struct {
	fx.In

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

func (*CommonAPI) AuthNew

func (a *CommonAPI) AuthNew(ctx context.Context, perms []auth.Permission) ([]byte, error)

func (*CommonAPI) AuthVerify

func (a *CommonAPI) AuthVerify(ctx context.Context, token string) ([]auth.Permission, error)

func (*CommonAPI) Closing added in v0.4.0

func (a *CommonAPI) Closing(ctx context.Context) (<-chan struct{}, error)

func (*CommonAPI) Discover added in v1.9.0

func (a *CommonAPI) Discover(ctx context.Context) (apitypes.OpenRPCDocument, error)

func (*CommonAPI) ID

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

func (*CommonAPI) LogList

func (a *CommonAPI) LogList(context.Context) ([]string, error)

func (*CommonAPI) LogSetLevel

func (a *CommonAPI) LogSetLevel(ctx context.Context, subsystem, level string) error

func (*CommonAPI) NetAddrsListen

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

func (*CommonAPI) NetAgentVersion added in v0.6.0

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

func (*CommonAPI) NetAutoNatStatus added in v0.5.0

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

func (*CommonAPI) NetBandwidthStats added in v0.5.9

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

func (*CommonAPI) NetBandwidthStatsByPeer added in v0.5.9

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

func (*CommonAPI) NetBandwidthStatsByProtocol added in v0.5.9

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

func (*CommonAPI) NetBlockAdd added in v1.2.2

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

func (*CommonAPI) NetBlockList added in v1.2.2

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

func (*CommonAPI) NetBlockRemove added in v1.2.2

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

func (*CommonAPI) NetConnect

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

func (*CommonAPI) NetConnectedness

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

func (*CommonAPI) NetDisconnect

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

func (*CommonAPI) NetFindPeer

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

func (*CommonAPI) NetPeerInfo added in v1.5.1

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

func (*CommonAPI) NetPeers

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

func (*CommonAPI) NetPubsubScores added in v0.3.1

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

func (*CommonAPI) Session added in v1.1.3

func (a *CommonAPI) Session(ctx context.Context) (uuid.UUID, error)

func (*CommonAPI) Shutdown added in v0.3.2

func (a *CommonAPI) Shutdown(ctx context.Context) error

func (*CommonAPI) Version

func (a *CommonAPI) Version(context.Context) (api.APIVersion, error)

Jump to

Keyboard shortcuts

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