poller

package
v0.0.0-...-62f2ae4 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2020 License: Apache-2.0 Imports: 2 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAlreadyStarted = errors.New("already started")
View Source
var ErrNoIPoller = errors.New("no IPoller object")
View Source
var ErrNoPollInterval = errors.New("no poll interval")
View Source
var ErrNotStarted = errors.New("not started")

Functions

This section is empty.

Types

type IPoller

type IPoller interface {
	Poll()
	Reset()
}

func MakeIPoller

func MakeIPoller(f func()) IPoller

MakeIPoller takes a poll func and returns an IPoller object

type Poller

type Poller struct {
	Interval time.Duration
	IPoller  IPoller
	// contains filtered or unexported fields
}

func (*Poller) Start

func (po *Poller) Start() error

func (*Poller) Stop

func (po *Poller) Stop() error

Jump to

Keyboard shortcuts

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