progress

package
v0.0.0-...-03a9efe Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2024 License: Apache-2.0 Imports: 19 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 {
	Interval time.Duration
	Timeout  time.Duration
}

type State

type State string
const (
	ReadyState      State = "ready"
	TerminatedState State = "terminated"
)

type Tracker

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

func NewProgressTracker

func NewProgressTracker(client kubernetes.Interface, logger *zap.SugaredLogger, config Config) (*Tracker, error)

func (*Tracker) AddResource

func (pt *Tracker) AddResource(kind WatchableResource, namespace, name string)

func (*Tracker) AddResourceWithInfo

func (pt *Tracker) AddResourceWithInfo(kind WatchableResource, namespace, name string, info *resource.Info)

func (*Tracker) Watch

func (pt *Tracker) Watch(ctx context.Context, targetState State) error

type WatchableResource

type WatchableResource string
const (
	Deployment               WatchableResource = "Deployment"
	Pod                      WatchableResource = "Pod"
	DaemonSet                WatchableResource = "DaemonSet"
	StatefulSet              WatchableResource = "StatefulSet"
	Job                      WatchableResource = "Job"
	CustomResourceDefinition WatchableResource = "CustomResourceDefinition"
)

func NewWatchableResource

func NewWatchableResource(kind string) (WatchableResource, error)

Jump to

Keyboard shortcuts

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