status

package
v0.0.0-...-2a6729a Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ReasonOlderGatewayClassExists gwapiv1.GatewayClassConditionReason = "OlderGatewayClassExists"

	MsgOlderGatewayClassExists   = "Invalid GatewayClass: another older GatewayClass with the same Spec.Controller exists"
	MsgValidGatewayClass         = "Valid GatewayClass"
	MsgGatewayClassInvalidParams = "Invalid parametersRef"
)

Variables

This section is empty.

Functions

func Error2ConditionMsg

func Error2ConditionMsg(err error) string

Error2ConditionMsg format the error string to a Status condition message. * Convert the first letter to capital * Append "." to the string if it doesn't exit

func MergeConditions

func MergeConditions(conditions []metav1.Condition, updates ...metav1.Condition) []metav1.Condition

MergeConditions adds or updates matching conditions, and updates the transition time if details of a condition have changed. Returns the updated condition array.

func SetGatewayClassAccepted

func SetGatewayClassAccepted(gc *gwapiv1.GatewayClass, accepted bool, reason, msg string) *gwapiv1.GatewayClass

SetGatewayClassAccepted inserts or updates the Accepted condition for the provided GatewayClass.

func UpdateGatewayStatusAcceptedCondition

func UpdateGatewayStatusAcceptedCondition(gw *gwapiv1.Gateway, accepted bool) *gwapiv1.Gateway

UpdateGatewayStatusAcceptedCondition updates the status condition for the provided Gateway based on the accepted state.

func UpdateGatewayStatusProgrammedCondition

func UpdateGatewayStatusProgrammedCondition(gw *gwapiv1.Gateway, svc *corev1.Service, deployment *appsv1.Deployment, nodeAddresses ...string)

UpdateGatewayStatusProgrammedCondition updates the status addresses for the provided gateway based on the status IP/Hostname of svc and updates the Programmed condition based on the service and deployment state.

Types

type Update

type Update struct {
	NamespacedName types.NamespacedName
	Resource       client.Object
	UpdateStatus   func(client.Object) client.Object
}

Update contain status update event information

type UpdateHandler

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

UpdateHandler handles status updates

func NewUpdateHandler

func NewUpdateHandler(client client.Client) *UpdateHandler

NewUpdateHandler get a new status update handler

func (*UpdateHandler) Send

func (updateHandler *UpdateHandler) Send(update Update)

Send public method to add status update events to the update channel.

func (*UpdateHandler) Start

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

Start starts the status update handler go routine.

Jump to

Keyboard shortcuts

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