status

package
v1.4.16 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package status implements utility routines related to the status of the Gateway API resource.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MetadataAccessor added in v1.4.0

type MetadataAccessor interface {
	GetObjectMeta() *metav1.ObjectMeta
	GetTypeMeta() *metav1.TypeMeta
	GetResource() client.Object
	GetTransitionTime() metav1.Time
	GetFullName() types.NamespacedName
	GetGeneration() int64
}

MetadataAccessor is an interface to access metadata of a resource.

type Mutator added in v1.3.0

type Mutator interface {
	Mutate(obj client.Object) client.Object
}

Mutator is an interface to hold mutator functions for status updates.

type MutatorFunc added in v1.3.0

type MutatorFunc func(client.Object) client.Object

MutatorFunc is a function adaptor for Mutators.

func (MutatorFunc) Mutate added in v1.3.0

func (m MutatorFunc) Mutate(old client.Object) client.Object

Mutate adapts the MutatorFunc to fit through the Mutator interface.

type PolicyAncestorStatusObject added in v1.4.0

type PolicyAncestorStatusObject interface {
	PolicyConditionAccessor
	GetPolicyStatusObject() PolicyStatusObject
	GetAncestorRef() gwv1.ParentReference
}

PolicyAncestorStatusObject is an interface to access the status of a Policy Ancestor.

type PolicyConditionAccessor added in v1.4.0

type PolicyConditionAccessor interface {
	ConditionExists(conditionType gwv1alpha2.PolicyConditionType) bool
	AddCondition(conditionType gwv1alpha2.PolicyConditionType, status metav1.ConditionStatus, reason gwv1alpha2.PolicyConditionReason, message string) metav1.Condition
}

PolicyConditionAccessor is an interface to access conditions of a Policy.

type PolicyStatusObject added in v1.4.0

type PolicyStatusObject interface {
	Mutator
	MetadataAccessor
	StatusUpdateFor(parentRef gwv1.ParentReference) PolicyAncestorStatusObject
	ConditionsForAncestorRef(parentRef gwv1.ParentReference) []metav1.Condition
}

PolicyStatusObject is an interface to access the status of a Policy.

type RouteConditionAccessor added in v1.4.0

type RouteConditionAccessor interface {
	ConditionExists(conditionType gwv1.RouteConditionType) bool
	AddCondition(conditionType gwv1.RouteConditionType, status metav1.ConditionStatus, reason gwv1.RouteConditionReason, message string) metav1.Condition
}

RouteConditionAccessor is an interface to access conditions of a Route.

type RouteParentStatusObject added in v1.4.0

type RouteParentStatusObject interface {
	RouteConditionAccessor
	GetRouteStatusObject() RouteStatusObject
	GetParentRef() gwv1.ParentReference
}

RouteParentStatusObject is an interface to access the status of a RouteParent.

type RouteStatusObject added in v1.4.0

type RouteStatusObject interface {
	Mutator
	MetadataAccessor
	GetRouteParentStatuses() []*gwv1.RouteParentStatus
	GetHostnames() []gwv1.Hostname
	StatusUpdateFor(parentRef gwv1.ParentReference) RouteParentStatusObject
	ConditionsForParentRef(parentRef gwv1.ParentReference) []metav1.Condition
}

RouteStatusObject is an interface to access the status of a Route.

type Update added in v1.3.0

type Update struct {
	NamespacedName types.NamespacedName
	Resource       client.Object
	Mutator        Mutator
}

Update contains an all the information needed to update an object's status. Send down a channel to the goroutine that actually writes the changes back.

type UpdateHandler added in v1.3.0

type UpdateHandler struct {
	// contains filtered or unexported fields
}

UpdateHandler holds the details required to actually write an Update back to the referenced object.

func NewUpdateHandler added in v1.3.0

func NewUpdateHandler(log zerolog.Logger, client client.Client) *UpdateHandler

func (*UpdateHandler) NeedLeaderElection added in v1.3.0

func (u *UpdateHandler) NeedLeaderElection() bool

func (*UpdateHandler) Start added in v1.3.0

func (u *UpdateHandler) Start(ctx context.Context) error

Start runs the goroutine to perform status writes.

func (*UpdateHandler) Writer added in v1.3.0

func (u *UpdateHandler) Writer() Updater

Writer retrieves the interface that should be used to write to the UpdateHandler.

type UpdateWriter added in v1.3.0

type UpdateWriter struct {
	// contains filtered or unexported fields
}

UpdateWriter takes status updates and sends these to the UpdateHandler via a channel.

func (*UpdateWriter) Send added in v1.3.0

func (u *UpdateWriter) Send(update Update)

Send sends the given Update off to the update channel for writing by the UpdateHandler.

type Updater added in v1.3.0

type Updater interface {
	Send(u Update)
}

Updater describes an interface to send status updates somewhere.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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