watcher

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2019 License: MPL-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IndexHasChange

func IndexHasChange(new, old uint64) bool

IndexHasChange is used to check whether a returned blocking query has an updated index, compared to a tracked value.

func MaxFound

func MaxFound(new, old uint64) uint64

MaxFound is used to determine which value passed is the greatest. This is used to track the most recently found highest index value.

Types

type Watcher

type Watcher interface {

	// Run is used to run the watcher loop. The input channel should be the channel where objects
	// are sent to be acted upon when they are determined to be new.
	Run(updateChan chan interface{})
}

Watcher is the interface to satisfy when creating a watcher to run blocking queries on an API and process updates as required.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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