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.
// Set to 0 to disable timeout.
AcceptTimeout time.Duration
// Debounce when restart is triggered by multiple errors
RestartDebounce time.Duration
// 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.
// Set to 0 to disable timeout.
CompleteTimeout time.Duration
// Called when a restart completes successfully
OnRestartComplete func(id datatransfer.ChannelID)
}
type Monitor ¶
type Monitor struct {
// contains filtered or unexported fields
}
Monitor watches the events for data transfer channels, and restarts a channel if there are timeouts / errors
func NewMonitor ¶
func (*Monitor) AddPullChannel ¶
func (m *Monitor) AddPullChannel(chid datatransfer.ChannelID) *monitoredChannel
AddPullChannel adds a pull channel to the channel monitor
func (*Monitor) AddPushChannel ¶
func (m *Monitor) AddPushChannel(chid datatransfer.ChannelID) *monitoredChannel
AddPushChannel adds a push channel to the channel monitor
Click to show internal directories.
Click to hide internal directories.