Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDataTransfer ¶
func NewDataTransfer(ds datastore.Batching, cidListsDir string, dataTransferNetwork network.DataTransferNetwork, transport datatransfer.Transport, storedCounter *storedcounter.StoredCounter, options ...DataTransferOption) (datatransfer.Manager, error)
NewDataTransfer initializes a new instance of a data transfer manager
Types ¶
type ChannelDataTransferType ¶
type ChannelDataTransferType int
ChannelDataTransferType identifies the type of a data transfer channel for the purposes of a restart
const ( // ManagerPeerCreatePull is the type of a channel wherein the manager peer created a Pull Data Transfer ManagerPeerCreatePull ChannelDataTransferType = iota // ManagerPeerCreatePush is the type of a channel wherein the manager peer created a Push Data Transfer ManagerPeerCreatePush // ManagerPeerReceivePull is the type of a channel wherein the manager peer received a Pull Data Transfer Request ManagerPeerReceivePull // ManagerPeerReceivePush is the type of a channel wherein the manager peer received a Push Data Transfer Request ManagerPeerReceivePush )
type DataTransferOption ¶
type DataTransferOption func(*manager)
DataTransferOption configures the data transfer manager
func ChannelRemoveTimeout ¶
func ChannelRemoveTimeout(timeout time.Duration) DataTransferOption
ChannelRemoveTimeout sets the timeout after which channels are removed from the manager
func PushChannelRestartConfig ¶
func PushChannelRestartConfig( interval time.Duration, checksPerInterval uint32, minBytesSent uint64, restartBackoff time.Duration, maxConsecutiveRestarts uint32, ) DataTransferOption
PushChannelRestartConfig sets the configuration options for automatically restarting push channels
- interval is the time over which minBytesSent must have been sent
- checksPerInterval is the number of times to check per interval
- minBytesSent is the minimum amount of data that must have been sent over the interval
- restartBackoff is the time to wait before checking again for restarts
- maxConsecutiveRestarts is the maximum number of restarts in a row to attempt where no data is transferred. When the limit is reached the channel is closed.
Click to show internal directories.
Click to hide internal directories.