rollout

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WaitUntilComplete

func WaitUntilComplete(objects []model.K8sMeta, wp WatchProvider, opts WaitOptions) (finalErr error)

WaitUntilComplete waits for the supplied objects to be ready and returns when they are. An error is returned if the function times out before all objects are ready. Any status listener provider is notified of individual status changes and errors during the wait. Individual watches having errors are turned into a aggregate error.

Types

type ObjectStatus

type ObjectStatus struct {
	Description string // the description of status for display
	Done        bool   // indicator if the status is "ready"
}

ObjectStatus is the opaque status of an object.

type StatusListener

type StatusListener interface {
	OnInit(objects []model.K8sMeta)                       // the set of objects that are being monitored
	OnStatusChange(object model.K8sMeta, rs ObjectStatus) // status for specified object
	OnError(object model.K8sMeta, err error)              // watch error of some kind for specified object
	OnEnd(err error)                                      // end of status updates with final error
}

StatusListener receives status update callbacks.

type WaitOptions

type WaitOptions struct {
	Listener StatusListener
	Timeout  time.Duration
}

WaitOptions are options to the wait function.

type WatchProvider

type WatchProvider func(obj model.K8sMeta) (watch.Interface, error)

WatchProvider provides a resource interface for a specific object type and namespace.

Jump to

Keyboard shortcuts

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