Documentation
¶
Index ¶
- type Channels
- func (c *Channels) CreateNew(tid datatransfer.TransferID, baseCid cid.Cid, selector ipld.Node, ...) (datatransfer.ChannelID, error)
- func (c *Channels) GetByIDAndSender(chid datatransfer.ChannelID, sender peer.ID) datatransfer.ChannelState
- func (c *Channels) InProgress() map[datatransfer.ChannelID]datatransfer.ChannelState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Channels ¶
type Channels struct {
// contains filtered or unexported fields
}
Channels is a thread safe list of channels
func (*Channels) CreateNew ¶
func (c *Channels) CreateNew(tid datatransfer.TransferID, baseCid cid.Cid, selector ipld.Node, voucher datatransfer.Voucher, initiator, dataSender, dataReceiver peer.ID) (datatransfer.ChannelID, error)
CreateNew creates a new channel id and channel state and saves to channels. returns error if the channel exists already.
func (*Channels) GetByIDAndSender ¶
func (c *Channels) GetByIDAndSender(chid datatransfer.ChannelID, sender peer.ID) datatransfer.ChannelState
GetByIDAndSender searches for a channel in the slice of channels with id `chid`, with the given sender. Returns datatransfer.EmptyChannelState if there is no channel with that id
func (*Channels) InProgress ¶
func (c *Channels) InProgress() map[datatransfer.ChannelID]datatransfer.ChannelState
InProgress returns a list of in progress channels
Click to show internal directories.
Click to hide internal directories.