timeout

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2020 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager registers and fires timeouts for the snow API.

func (*Manager) Cancel

func (m *Manager) Cancel(validatorID ids.ShortID, chainID ids.ID, requestID uint32)

Cancel request timeout with the specified parameters.

func (*Manager) Dispatch

func (m *Manager) Dispatch()

Dispatch ...

func (*Manager) Initialize

func (m *Manager) Initialize(duration time.Duration)

Initialize this timeout manager.

External requests are requests that depend on other nodes to perform an action. Internal requests are requests that only exist inside this node.

[duration] is the amount of time to allow for external requests before the request times out.

func (*Manager) Register

func (m *Manager) Register(validatorID ids.ShortID, chainID ids.ID, requestID uint32, timeout func())

Register request to time out unless Manager.Cancel is called before the timeout duration passes, with the same request parameters.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL