auction

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2021 License: MIT Imports: 8 Imported by: 13

Documentation

Index

Constants

View Source
const (

	// MinDealDuration is the minimum allowed deal duration in epochs requested of miners.
	MinDealDuration = epochsPerDay * 365 / 2 // ~6 months
	// MaxDealDuration is the maximum allowed deal duration in epochs requested of miners.
	MaxDealDuration = epochsPerDay * 510 // As far as we know, is the safest max duration that all miners accept.

	// HTTPCarHeaderOnly is a HTTP header indicating that the bidbot wants
	// only the CAR file header, as a hint to the HTTP server.
	HTTPCarHeaderOnly = "X-Bidbot-Car-Header-Only"
)
View Source
const Topic string = "/textile/auction/0.0.1"

Topic is used by brokers to publish and by miners to subscribe to deal auction.

Variables

This section is empty.

Functions

func BidsTopic

func BidsTopic(auctionID ID) string

BidsTopic is used by miners to submit deal auction bids. "/textile/auction/0.0.1/<auction_id>/bids".

func ProposalsTopic

func ProposalsTopic(pid peer.ID) string

ProposalsTopic is used by brokers to notify a bidbot of the proposal cid.Cid for an accepted deal auction. "/textile/auction/0.0.1/<peer_id>/proposals".

func WinsTopic

func WinsTopic(pid peer.ID) string

WinsTopic is used by brokers to notify a bidbot that it has won the deal auction. "/textile/auction/0.0.1/<peer_id>/wins".

Types

type BidID

type BidID string

BidID is a unique identifier for a Bid.

type CARIPFS

type CARIPFS struct {
	Cid        cid.Cid
	Multiaddrs []multiaddr.Multiaddr
}

CARIPFS contains details of a CAR file Cid stored in an HTTP endpoint.

type CARURL

type CARURL struct {
	URL url.URL
}

CARURL contains details of a CAR file stored in an HTTP endpoint.

type ID added in v0.0.5

type ID string

ID is a unique identifier for an Auction.

type Sources

type Sources struct {
	CARURL  *CARURL
	CARIPFS *CARIPFS
}

Sources contains information about download sources for prepared data.

func (Sources) String

func (s Sources) String() string

String returns the string representation of the sources.

func (Sources) Validate

func (s Sources) Validate() error

Validate ensures Sources are valid.

Jump to

Keyboard shortcuts

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