timeout

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2020 License: BSD-3-Clause Imports: 6 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(
	namespace string,
	registerer prometheus.Registerer,
) error

Initialize this timeout manager.

func (*Manager) Register

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

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