Documentation
¶
Index ¶
- func GetChannelStateMigrations(selfPeer peer.ID) (versioning.VersionedMigrationList, error)
- func GetMigrateChannelState0To1(selfPeer peer.ID) func(*ChannelState0) (*internal.ChannelState, error)
- func MigrateEncodedVoucher0To1(oldV EncodedVoucher0) internal.EncodedVoucher
- func MigrateEncodedVoucherResult0To1(oldV EncodedVoucherResult0) internal.EncodedVoucherResult
- type ChannelState0
- type EncodedVoucher0
- type EncodedVoucherResult0
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetChannelStateMigrations ¶
func GetChannelStateMigrations(selfPeer peer.ID) (versioning.VersionedMigrationList, error)
GetChannelStateMigrations returns a migration list for the channel states
func GetMigrateChannelState0To1 ¶
func GetMigrateChannelState0To1(selfPeer peer.ID) func(*ChannelState0) (*internal.ChannelState, error)
GetMigrateChannelState0To1 returns a conversion function for migrating v0 channel state to v1
func MigrateEncodedVoucher0To1 ¶
func MigrateEncodedVoucher0To1(oldV EncodedVoucher0) internal.EncodedVoucher
MigrateEncodedVoucher0To1 converts a tuple encoded voucher to a map encoded voucher
func MigrateEncodedVoucherResult0To1 ¶
func MigrateEncodedVoucherResult0To1(oldV EncodedVoucherResult0) internal.EncodedVoucherResult
MigrateEncodedVoucherResult0To1 converts a tuple encoded voucher to a map encoded voucher
Types ¶
type ChannelState0 ¶
type ChannelState0 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 []EncodedVoucher0
VoucherResults []EncodedVoucherResult0
}
ChannelState0 is version 0 of ChannelState
func (*ChannelState0) MarshalCBOR ¶
func (t *ChannelState0) MarshalCBOR(w io.Writer) error
func (*ChannelState0) UnmarshalCBOR ¶
func (t *ChannelState0) UnmarshalCBOR(r io.Reader) error
type EncodedVoucher0 ¶
type EncodedVoucher0 struct {
// Vouchers identifier for decoding
Type datatransfer.TypeIdentifier
// used to verify this channel
Voucher *cbg.Deferred
}
EncodedVoucher0 is version 0 of EncodedVoucher
func (*EncodedVoucher0) MarshalCBOR ¶
func (t *EncodedVoucher0) MarshalCBOR(w io.Writer) error
func (*EncodedVoucher0) UnmarshalCBOR ¶
func (t *EncodedVoucher0) UnmarshalCBOR(r io.Reader) error
type EncodedVoucherResult0 ¶
type EncodedVoucherResult0 struct {
// Vouchers identifier for decoding
Type datatransfer.TypeIdentifier
// used to verify this channel
VoucherResult *cbg.Deferred
}
EncodedVoucherResult0 is version 0 of EncodedVoucherResult
func (*EncodedVoucherResult0) MarshalCBOR ¶
func (t *EncodedVoucherResult0) MarshalCBOR(w io.Writer) error
func (*EncodedVoucherResult0) UnmarshalCBOR ¶
func (t *EncodedVoucherResult0) UnmarshalCBOR(r io.Reader) error
Click to show internal directories.
Click to hide internal directories.