internal

package
v1.15.3 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2023 License: Apache-2.0, MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChannelState

type ChannelState struct {
	// PeerId of the manager peer
	SelfPeer peer.ID
	// an identifier for this channel shared by request and responder, set by requester through protocol
	TransferID datatransfer.TransferID
	// Initiator is the person who intiated this datatransfer request
	Initiator peer.ID
	// Responder is the person who is responding to this datatransfer request
	Responder peer.ID
	// base CID for the piece being transferred
	BaseCid cid.Cid
	// portion of Piece to return, specified by an IPLD selector
	Selector *cbg.Deferred
	// the party that is sending the data (not who initiated the request)
	Sender peer.ID
	// the party that is receiving the data (not who initiated the request)
	Recipient peer.ID
	// expected amount of data to be transferred
	TotalSize uint64
	// current status of this deal
	Status datatransfer.Status
	// total bytes read from this node and queued for sending (0 if receiver)
	Queued uint64
	// total bytes sent from this node (0 if receiver)
	Sent uint64
	// total bytes received by this node (0 if sender)
	Received uint64
	// more informative status on a channel
	Message        string
	Vouchers       []EncodedVoucher
	VoucherResults []EncodedVoucherResult
	// Number of blocks that have been received, including blocks that are
	// present in more than one place in the DAG
	ReceivedBlocksTotal int64
	// Number of blocks that have been queued, including blocks that are
	// present in more than one place in the DAG
	QueuedBlocksTotal int64
	// Number of blocks that have been sent, including blocks that are
	// present in more than one place in the DAG
	SentBlocksTotal int64
	// Stages traces the execution fo a data transfer.
	//
	// EXPERIMENTAL; subject to change.
	Stages *datatransfer.ChannelStages
}

ChannelState is the internal representation on disk for the channel fsm

func (*ChannelState) AddLog added in v1.4.1

func (cs *ChannelState) AddLog(msg string, a ...interface{})

AddLog takes an fmt string with arguments, and adds the formatted string to the logs for the current deal stage.

EXPERIMENTAL; subject to change.

func (*ChannelState) MarshalCBOR

func (t *ChannelState) MarshalCBOR(w io.Writer) error

func (*ChannelState) UnmarshalCBOR

func (t *ChannelState) UnmarshalCBOR(r io.Reader) error

type EncodedVoucher

type EncodedVoucher struct {
	// Vouchers identifier for decoding
	Type datatransfer.TypeIdentifier
	// used to verify this channel
	Voucher *cbg.Deferred
}

EncodedVoucher is how the voucher is stored on disk

func (*EncodedVoucher) MarshalCBOR

func (t *EncodedVoucher) MarshalCBOR(w io.Writer) error

func (*EncodedVoucher) UnmarshalCBOR

func (t *EncodedVoucher) UnmarshalCBOR(r io.Reader) error

type EncodedVoucherResult

type EncodedVoucherResult struct {
	// Vouchers identifier for decoding
	Type datatransfer.TypeIdentifier
	// used to verify this channel
	VoucherResult *cbg.Deferred
}

EncodedVoucherResult is how the voucher result is stored on disk

func (*EncodedVoucherResult) MarshalCBOR

func (t *EncodedVoucherResult) MarshalCBOR(w io.Writer) error

func (*EncodedVoucherResult) UnmarshalCBOR

func (t *EncodedVoucherResult) UnmarshalCBOR(r io.Reader) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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