Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChannelState ¶
type ChannelState struct {
// 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 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 version 0 of ChannelState
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 version 0 of EncodedVoucher
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 version 0 of EncodedVoucherResult
func (*EncodedVoucherResult) MarshalCBOR ¶
func (t *EncodedVoucherResult) MarshalCBOR(w io.Writer) error
func (*EncodedVoucherResult) UnmarshalCBOR ¶
func (t *EncodedVoucherResult) UnmarshalCBOR(r io.Reader) error
Click to show internal directories.
Click to hide internal directories.