internal

package
v1.7.3 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2021 License: Apache-2.0, MIT Imports: 7 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
}

ChannelState is the internal representation on disk for the channel fsm

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
v0
v1

Jump to

Keyboard shortcuts

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