kicker

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2021 License: Apache-2.0 Imports: 3 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config interface {
	NewKicker() Kicker
}

Config is a builder of a Kicker.

type Kickable

type Kickable interface {
	Kick()
}

Kickable is an interface of something kickable.

type Kicker

type Kicker interface {
	Start(kickable Kickable)
	Stop() <-chan struct{}
	Ping()
	PollingInterval() uint
}

Kicker is an interface to control frequency of kicking a Kickable object.

type PollingKicker

type PollingKicker struct {
	Interval uint
}

PollingKicker is a builder of a Kicker which kicks a Kickable repeatedly on some interval.

func (*PollingKicker) NewKicker

func (cfg *PollingKicker) NewKicker() Kicker

NewKicker creates a new polling kicker instance.

Jump to

Keyboard shortcuts

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