lp2pimpl

package
v1.7.5 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: Apache-2.0, MIT Imports: 22 Imported by: 3

Documentation

Index

Constants

View Source
const DealProtocolv120ID = "/fil/storage/mk/1.2.0"
View Source
const DealProtocolv121ID = "/fil/storage/mk/1.2.1"
View Source
const DealStatusV12ProtocolID = "/fil/storage/status/1.2.0"

Variables

This section is empty.

Functions

This section is empty.

Types

type DealClient

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

DealClient sends deal proposals over libp2p

func NewDealClient

func NewDealClient(h host.Host, addr address.Address, walletApi api.Wallet, options ...DealClientOption) *DealClient

func (*DealClient) SendDealProposal

func (c *DealClient) SendDealProposal(ctx context.Context, id peer.ID, params types.DealParams) (*types.DealResponse, error)

SendDealProposal sends a deal proposal over a libp2p stream to the peer

func (*DealClient) SendDealStatusRequest

func (c *DealClient) SendDealStatusRequest(ctx context.Context, id peer.ID, dealUUID uuid.UUID) (*types.DealStatusResponse, error)

type DealClientOption

type DealClientOption func(*DealClient)

DealClientOption is an option for configuring the libp2p storage deal client

func RetryParameters

func RetryParameters(minDuration time.Duration, maxDuration time.Duration, attempts float64, backoffFactor float64) DealClientOption

RetryParameters changes the default parameters around connection reopening

type DealProvider

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

DealProvider listens for incoming deal proposals over libp2p

func NewDealProvider

func NewDealProvider(h host.Host, prov *storagemarket.Provider, fullNodeApi v1api.FullNode, plDB *db.ProposalLogsDB, spApi sealingpipeline.API) *DealProvider

func (*DealProvider) Start

func (p *DealProvider) Start(ctx context.Context)

func (*DealProvider) Stop

func (p *DealProvider) Stop()

Jump to

Keyboard shortcuts

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