request

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateResourceInterpreterContext

func CreateResourceInterpreterContext(versions []string, attributes *Attributes) (uid types.UID, request runtime.Object, err error)

CreateResourceInterpreterContext returns the unique request uid, the ResourceInterpreterContext object to send the webhook, or an error if the webhook does not support receiving any of the versions we know to send.

func CreateV1alpha1ResourceInterpreterContext

func CreateV1alpha1ResourceInterpreterContext(uid types.UID, attributes *Attributes) *configv1alpha1.ResourceInterpreterContext

CreateV1alpha1ResourceInterpreterContext creates an ResourceInterpreterContext for the provided RequestAttributes.

Types

type Attributes

type Attributes struct {
	Operation        configv1alpha1.InterpreterOperation
	Object           *unstructured.Unstructured
	ObservedObj      *unstructured.Unstructured
	ReplicasSet      int32
	AggregatedStatus []workv1alpha2.AggregatedStatusItem
}

Attributes Attributes contains the attributes that call webhook.

type ResponseAttributes

type ResponseAttributes struct {
	Successful          bool
	Status              configv1alpha1.RequestStatus
	Replicas            int32
	ReplicaRequirements *workv1alpha2.ReplicaRequirements
	Dependencies        []configv1alpha1.DependentObjectReference
	Patch               []byte
	PatchType           configv1alpha1.PatchType
	RawStatus           runtime.RawExtension
	Healthy             bool
}

ResponseAttributes contains the attributes that response by the webhook.

func VerifyResourceInterpreterContext

func VerifyResourceInterpreterContext(uid types.UID, operation configv1alpha1.InterpreterOperation, interpreterContext runtime.Object) (response *ResponseAttributes, err error)

VerifyResourceInterpreterContext checks the validity of the provided resourceInterpreterContext, and returns ResponseAttributes, or an error if the provided resourceInterpreterContext was not valid.

Jump to

Keyboard shortcuts

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