pinwatcher

package
v0.0.0-...-7864f83 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PinWatcher

type PinWatcher interface {
	Register(
		p models.PinStatus,
		targetStatus clusterapi.TrackerStatus,
		checkFreq time.Duration,
	)
	Deregister(pid string)
}

func New

func New(
	ctx context.Context,
	client cluster.Client,
	db pinsdb.Pins,
) PinWatcher

type StatusTracker

type StatusTracker interface {
	Poll(target clusterapi.TrackerStatus, checkFreq time.Duration)
	CheckStatus(target clusterapi.TrackerStatus) bool
	Stop()
	GetId() string
}

func NewStatusTracker

func NewStatusTracker(
	ctx context.Context,
	client cluster.Client,
	db pinsdb.Pins,
	pin models.PinStatus,
) StatusTracker

Jump to

Keyboard shortcuts

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