replication

package
v0.2.14 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2023 License: Apache-2.0, MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StorageProposalV120 = "/fil/storage/mk/1.2.0"
	StorageProposalV111 = "/fil/storage/mk/1.1.1"
)

Variables

This section is empty.

Functions

func EpochToTime

func EpochToTime(epoch abi.ChainEpoch) time.Time

func TimeToEpoch

func TimeToEpoch(t time.Time) abi.ChainEpoch

Types

type DealMaker

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

func NewDealMaker

func NewDealMaker(lotusURL string, lotusToken string, libp2p host.Host) (*DealMaker, error)

func (DealMaker) GetProtocols

func (d DealMaker) GetProtocols(ctx context.Context, minerInfo peer.AddrInfo) ([]protocol.ID, error)

func (DealMaker) GetProviderInfo

func (d DealMaker) GetProviderInfo(ctx context.Context, provider string) (MinerInfo, error)

func (DealMaker) MakeDeal

func (d DealMaker) MakeDeal(ctx context.Context, now time.Time, walletObj model.Wallet,
	car model.Car, schedule model.Schedule, minerInfo peer.AddrInfo) (string, error)

type DealProviderCollateralBound

type DealProviderCollateralBound struct {
	Min string
	Max string
}

type MinerInfo

type MinerInfo struct {
	PeerIDEncoded           string `json:"PeerID"`
	PeerID                  peer.ID
	MultiaddrsBase64Encoded []string `json:"Multiaddrs"`
	Multiaddrs              []multiaddr.Multiaddr
}

nolint: tagliatelle

type WalletChooser

type WalletChooser struct {
}

func (WalletChooser) Choose

func (w WalletChooser) Choose(ctx context.Context, wallets []model.Wallet) model.Wallet

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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