types

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: 2 Imported by: 2

Documentation

Index

Constants

View Source
const DataTransferProtocol = "/fil/storage/transfer/1.0.0"

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpRequest

type HttpRequest struct {
	// URL can be
	// - an http URL:
	//   "https://example.com/path"
	// - a libp2p URL:
	//   "libp2p:///ip4/104.131.131.82/tcp/4001/ipfs/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ"
	//   Must include a Peer ID
	URL string
	// Headers are the HTTP headers that are sent as part of the request,
	// eg "Authorization"
	Headers map[string]string
}

HttpRequest has parameters for an HTTP transfer

type TransferState

type TransferState struct {
	ID         string
	LocalAddr  string
	RemoteAddr string
	Status     TransferStatus
	Sent       uint64
	Received   uint64
	Message    string
	PayloadCid cid.Cid
}

TransferState describes a transfer's current state

type TransferStatus

type TransferStatus string

TransferStatus describes the status of a transfer (started, completed etc)

const (
	// TransferStatusStarted is set when the transfer starts
	TransferStatusStarted TransferStatus = "TransferStatusStarted"
	// TransferStatusStarted is set when the transfer restarts after previously starting
	TransferStatusRestarted TransferStatus = "TransferStatusRestarted"
	TransferStatusOngoing   TransferStatus = "TransferStatusOngoing"
	TransferStatusCompleted TransferStatus = "TransferStatusCompleted"
	TransferStatusFailed    TransferStatus = "TransferStatusFailed"
)

type TransportDealInfo

type TransportDealInfo struct {
	OutputFile string
	DealUuid   uuid.UUID
	DealSize   int64
}

TransportDealInfo has parameters for a transfer to be executed

type TransportEvent

type TransportEvent struct {
	NBytesReceived int64
	Error          error
}

TransportEvent is fired as a transfer progresses

Jump to

Keyboard shortcuts

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