Documentation
¶
Index ¶
- type Transport
- func (t *Transport) CleanupChannel(chid datatransfer.ChannelID)
- func (t *Transport) CloseChannel(ctx context.Context, chid datatransfer.ChannelID) error
- func (t *Transport) OpenChannel(ctx context.Context, dataSender peer.ID, channelID datatransfer.ChannelID, ...) error
- func (t *Transport) PauseChannel(ctx context.Context, chid datatransfer.ChannelID) error
- func (t *Transport) ResumeChannel(ctx context.Context, msg message.DataTransferMessage, ...) error
- func (t *Transport) SetEventHandler(events transport.Events) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Transport ¶
type Transport struct {
// contains filtered or unexported fields
}
Transport manages graphsync hooks for data transfer, translating from graphsync hooks to semantic data transfer events
func NewTransport ¶
NewTransport makes a new hooks manager with the given hook events interface
func (*Transport) CleanupChannel ¶
func (t *Transport) CleanupChannel(chid datatransfer.ChannelID)
CleanupChannel is called on the otherside of a cancel - removes any associated data for the channel
func (*Transport) CloseChannel ¶
CloseChannel closes the given channel
func (*Transport) OpenChannel ¶
func (t *Transport) OpenChannel(ctx context.Context, dataSender peer.ID, channelID datatransfer.ChannelID, root ipld.Link, stor ipld.Node, msg message.DataTransferMessage) error
OpenChannel initiates an outgoing request for the other peer to send data to us on this channel Note: from a data transfer symantic standpoint, it doesn't matter if the request is push or pull -- OpenChannel is called by the party that is intending to receive data
func (*Transport) PauseChannel ¶
PauseChannel paused the given channel ID
func (*Transport) ResumeChannel ¶
func (t *Transport) ResumeChannel(ctx context.Context, msg message.DataTransferMessage, chid datatransfer.ChannelID, ) error
ResumeChannel resumes the given channel