watch

package
v0.46.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: Apache-2.0 Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	ChangeTypeAdded    = output.ChangeTypeAdded
	ChangeTypeModified = output.ChangeTypeModified
	ChangeTypeDeleted  = output.ChangeTypeDeleted
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Change

type Change = output.Change

type ChangeType

type ChangeType = output.ChangeType

Re-export output types for use within watch package

type Differ

type Differ struct {
	// contains filtered or unexported fields
}

func NewDiffer

func NewDiffer() *Differ

func (*Differ) Detect

func (d *Differ) Detect(current []interface{}) []Change

func (*Differ) Reset

func (d *Differ) Reset()

type ResourceFetcher

type ResourceFetcher func() (interface{}, error)

type Watcher

type Watcher struct {
	// contains filtered or unexported fields
}

func NewWatcher

func NewWatcher(opts WatcherOptions) *Watcher

func (*Watcher) Start

func (w *Watcher) Start(ctx context.Context) error

func (*Watcher) Stop

func (w *Watcher) Stop()

type WatcherOptions

type WatcherOptions struct {
	Interval    time.Duration
	Client      *client.Client
	Fetcher     ResourceFetcher
	Printer     output.Printer
	ShowInitial bool
}

Jump to

Keyboard shortcuts

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