policy

package
v1.7.5 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2023 License: Apache-2.0 Imports: 8 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ResourceLabels

type ResourceLabels struct {
	Trigger *v1alpha1.Trigger
	Client  dynamic.NamespaceableResourceInterface
	Obj     *unstructured.Unstructured
}

ResourceLabels implements trigger policy based on the resource labels

func (*ResourceLabels) ApplyPolicy

func (rl *ResourceLabels) ApplyPolicy(ctx context.Context) error

type StatusPolicy

type StatusPolicy struct {
	// Status represents the status of a generic operation
	Status int
	// Statuses refers to list of response status allowed
	Statuses []int
}

StatusPolicy implements the policy for a HTTP trigger

func NewStatusPolicy

func NewStatusPolicy(status int, statuses []int) *StatusPolicy

NewStatusPolicy returns a new HTTP trigger policy

func (*StatusPolicy) ApplyPolicy

func (hp *StatusPolicy) ApplyPolicy(ctx context.Context) error

Jump to

Keyboard shortcuts

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