client

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: May 9, 2023 License: Apache-2.0, MIT Imports: 25 Imported by: 1

Documentation

Index

Constants

View Source
const RetrievalQueryProtocol = "/fil/retrieval/qry/1.0.0"

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ChannelMonitorConfig dtchannelmonitor.Config
	Datastore            datastore.Batching
	GraphsyncOpts        []graphsync.Option
	Host                 host.Host
	RetrievalConfigurer  datatransfer.TransportConfigurer
}

type RetrievalClient

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

func NewClient

func NewClient(ctx context.Context, datastore datastore.Batching, host host.Host, opts ...func(*Config)) (*RetrievalClient, error)

Creates a new RetrievalClient

func NewClientWithConfig

func NewClientWithConfig(ctx context.Context, cfg *Config) (*RetrievalClient, error)

Creates a new RetrievalClient with the given Config

func (*RetrievalClient) AwaitReady

func (rc *RetrievalClient) AwaitReady() error

func (*RetrievalClient) Connect added in v0.7.0

func (rc *RetrievalClient) Connect(ctx context.Context, peerAddr peer.AddrInfo) error

func (*RetrievalClient) RetrieveFromPeer

func (rc *RetrievalClient) RetrieveFromPeer(
	ctx context.Context,
	linkSystem ipld.LinkSystem,
	peerID peer.ID,
	proposal *retrievaltypes.DealProposal,
	sel ipld.Node,
	maxBlocks uint64,
	eventsCallback datatransfer.Subscriber,
	gracefulShutdownRequested <-chan struct{},
) (*types.RetrievalStats, error)

Jump to

Keyboard shortcuts

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