containerwatcher

package
v1.16.3 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrTimeout = fmt.Errorf("timeout while waiting")

Functions

This section is empty.

Types

type NoopWatcher

type NoopWatcher struct {
}

func (NoopWatcher) WaitToExit

func (n NoopWatcher) WaitToExit(ctx context.Context) error

func (NoopWatcher) WaitToStart

func (n NoopWatcher) WaitToStart(ctx context.Context) error

type SignalWatcher added in v1.16.0

type SignalWatcher struct {
}

func (SignalWatcher) WaitToExit added in v1.16.0

func (n SignalWatcher) WaitToExit(ctx context.Context) error

func (SignalWatcher) WaitToStart added in v1.16.0

func (n SignalWatcher) WaitToStart(ctx context.Context) error

type Watcher

type Watcher interface {
	WaitToStart(ctx context.Context) error
	WaitToExit(ctx context.Context) error
}

type WatcherType

type WatcherType = string
const (
	// Uses Kube 1.28 feature - https://kubernetes.io/docs/concepts/workloads/pods/sidecar-containers/
	// Watching SIGTERM when main container exit
	WatcherTypeSignal WatcherType = "signal"
	// Dummy watcher. Exits immediately, assuming success
	WatcherTypeNoop WatcherType = "noop"
)

Jump to

Keyboard shortcuts

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