Documentation ¶
Index ¶
- func Configuration(namespace, name string, co ...testingv1.ConfigOption) *v1.Configuration
- func MakePolicy(namespace, name string, po ...PolicyOption) *v1alpha1.Policy
- func PolicyState(namespace, name string, pso ...PolicyStateOption) *psv1alpha1.PolicyState
- func Revision(namespace, name string, ro ...testingv1.RevisionOption) *v1.Revision
- type PolicyOption
- type PolicyStateOption
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
Types ¶
type PolicyOption ¶
PolicyOption enables further configuration of a Policy.
func WithDefaultThreshold ¶
func WithDefaultThreshold(defaultThreshold int) PolicyOption
WithDefaultThreshold sets the Spec.DefaultThreshold 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
Click to show internal directories.
Click to hide internal directories.