resources

package
v0.0.0-...-45caf10 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Configuration

func Configuration(namespace, name string, co ...testingv1.ConfigOption) *v1.Configuration

Configuration creates a configuration with ConfigOptions

func MakePolicy

func MakePolicy(namespace, name string, po ...PolicyOption) *v1alpha1.Policy

MakePolicy returns a new Policy it's not named Policy in order to avoid "redeclared during import" errors due to name conflict

func PolicyState

func PolicyState(namespace, name string, pso ...PolicyStateOption) *psv1alpha1.PolicyState

PolicyState returns a new PolicyState

func Revision

func Revision(namespace, name string, ro ...testingv1.RevisionOption) *v1.Revision

Revision creates a revision with RevisionOptions

Types

type PolicyOption

type PolicyOption func(*v1alpha1.Policy)

PolicyOption enables further configuration of a Policy.

func WithDefaultThreshold

func WithDefaultThreshold(defaultThreshold int) PolicyOption

WithDefaultThreshold sets the Spec.DefaultThreshold of a Policy

func WithMode

func WithMode(mode string) PolicyOption

WithMode sets the Spec.Mode of a Policy

func WithStages

func WithStages(stages ...v1alpha1.Stage) PolicyOption

WithStages sets the Spec.Stages of a Policy

type PolicyStateOption

type PolicyStateOption func(*psv1alpha1.PolicyState)

PolicyStateOption enables further configuration of a PolicyState.

func WithNextUpdateTimestamp

func WithNextUpdateTimestamp(t time.Time) PolicyStateOption

WithNextUpdateTimestamp sets the Status.NextUpdateTimestamp of a PolicyState

func WithPSSpecTraffic

func WithPSSpecTraffic(traffic ...v1.TrafficTarget) PolicyStateOption

WithPSSpecTraffic sets the spec traffic of a PolicyState

func WithPSStatusTraffic

func WithPSStatusTraffic(traffic ...v1.TrafficTarget) PolicyStateOption

WithPSStatusTraffic sets the status traffic of a PolicyState

Jump to

Keyboard shortcuts

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