watch

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Kubeconfig string
	Context    string
	Namespace  string
	// RestConfig allows passing a pre-built rest.Config (e.g., for testing).
	// If set, Kubeconfig and Context are ignored.
	RestConfig *rest.Config
}

Config holds the Kubernetes connection configuration.

type Options

type Options struct {
	StripManagedFields bool
	StripServerFields  bool
	NoColor            bool
	ShowTimestamps     bool
	Differ             diff.Differ
	Output             io.Writer
	LabelSelector      string
	FieldSelector      string
	AllNamespaces      bool
}

Options configures the watcher behavior.

type Watcher

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

Watcher watches Kubernetes resources and diffs changes.

func New

func New(cfg Config, opts Options) (*Watcher, error)

New creates a new Watcher from the given config.

func (*Watcher) Run

func (w *Watcher) Run(ctx context.Context, args []string) error

Run starts watching the specified resources. args follow kubectl conventions: [resource] or [resource] [name] or resource/name

Jump to

Keyboard shortcuts

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