Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Max time to wait for other side to accept open channel request before attempting restart
AcceptTimeout time.Duration
// Interval between checks of transfer rate
Interval time.Duration
// Min bytes that must be sent / received in interval
MinBytesTransferred uint64
// Number of times to check transfer rate per interval
ChecksPerInterval uint32
// Backoff after restarting
RestartBackoff time.Duration
// Number of times to try to restart before failing
MaxConsecutiveRestarts uint32
// Max time to wait for the responder to send a Complete message once all
// data has been sent
CompleteTimeout time.Duration
}
type Monitor ¶
type Monitor struct {
// contains filtered or unexported fields
}
Monitor watches the data-rate for data transfer channels, and restarts a channel if the data-rate falls too low or if there are timeouts / errors
func NewMonitor ¶
func (*Monitor) AddPullChannel ¶
func (m *Monitor) AddPullChannel(chid datatransfer.ChannelID) monitoredChan
AddPullChannel adds a pull channel to the channel monitor
func (*Monitor) AddPushChannel ¶
func (m *Monitor) AddPushChannel(chid datatransfer.ChannelID) monitoredChan
AddPushChannel adds a push channel to the channel monitor
Click to show internal directories.
Click to hide internal directories.