rollout

package
v0.7.3 Latest Latest
Warning

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

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

Documentation

Overview

Package rollout implements waiting for rollout completion of a set of objects.

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 StatusListener

type StatusListener interface {
	OnInit(objects []model.K8sMeta)                              // the set of objects that are being monitored
	OnStatusChange(object model.K8sMeta, rs types.RolloutStatus) // 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