vole

package
v0.0.0-...-0fe74fe Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: MIT Imports: 38 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DhtGet

func DhtGet(ctx context.Context, key []byte, proto protocol.ID, ma multiaddr.Multiaddr) (*recpb.Record, error)

func DhtGetClosestPeers

func DhtGetClosestPeers(ctx context.Context, key []byte, proto protocol.ID, ma multiaddr.Multiaddr) ([]*peer.AddrInfo, error)

func DhtGetProvs

func DhtGetProvs(ctx context.Context, key []byte, proto protocol.ID, ma multiaddr.Multiaddr) ([]*peer.AddrInfo, error)

func DhtProtocolMessenger

func DhtProtocolMessenger(ctx context.Context, proto protocol.ID, ai *peer.AddrInfo) (*dhtpb.ProtocolMessenger, error)

func DhtPut

func DhtPut(ctx context.Context, key, value []byte, proto protocol.ID, ma multiaddr.Multiaddr) error

func GetBitswapCID

func GetBitswapCID(root cid.Cid, ai *peer.AddrInfo) error

func Ping

func Ping(ctx context.Context, forceRelay bool, p *peer.AddrInfo) error

Types

type BsCheckOutput

type BsCheckOutput struct {
	Found     bool
	Responded bool
	Error     error
}

func CheckBitswapCID

func CheckBitswapCID(ctx context.Context, c cid.Cid, ma multiaddr.Multiaddr, getBlock bool) (*BsCheckOutput, error)

func (*BsCheckOutput) MarshalJSON

func (o *BsCheckOutput) MarshalJSON() ([]byte, error)

type IdentifyInfo

type IdentifyInfo struct {
	PeerId          peer.ID
	ProtocolVersion string
	AgentVersion    string
	Addresses       []multiaddr.Multiaddr
	Protocols       []protocol.ID
}

func IdentifyRequest

func IdentifyRequest(ctx context.Context, maStr string, allowUnknownPeer bool) (*IdentifyInfo, error)

Jump to

Keyboard shortcuts

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