status

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2026 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Overview

Copyright 2025 HAProxy Technologies LLC

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterStatusByControllerName

func FilterStatusByControllerName(routeStatus gatewayv1.HTTPRouteStatus, controllerName string) gatewayv1.HTTPRouteStatus

func FilterTLSRouteStatusByControllerName added in v0.8.0

func FilterTLSRouteStatusByControllerName(tlsRouteStatus v1alpha2.TLSRouteStatus, controllerName string) v1alpha2.TLSRouteStatus

func ListenerStatusesEqual

func ListenerStatusesEqual(a, b []gatewayv1.ListenerStatus) bool

func RouteStatusesEqual

func RouteStatusesEqual(a, b rc.RouteConditions) bool

func TryPatchStatusFunc

func TryPatchStatusFunc[T client.Object](param StatusUpdateParams[T]) func(ctx context.Context) (bool, error)

func TryUpdateStatusFunc

func TryUpdateStatusFunc[T client.Object](param StatusUpdateParams[T]) func(ctx context.Context) (bool, error)

Types

type StatusPatcher

type StatusPatcher interface {
	StatusEqual(client.Object) (bool, error)
	SetStatus(client.Object) error
}

type StatusUpdateParams

type StatusUpdateParams[T client.Object] struct {
	Object        T
	StatusPatcher StatusPatcher
	Getter        client.Client
	StatusUpdater client.SubResourceWriter
	Logger        *slog.Logger

	NsName types.NamespacedName
	// contains filtered or unexported fields
}

type StatusUpdater

type StatusUpdater interface {
	UpdateStatus(ctx context.Context)
}

func NewStatusUpdater

func NewStatusUpdater(
	cfg StatusUpdaterConf,
	gatewayClasses map[types.NamespacedName]*tree.GatewayClass,
	gateways map[types.NamespacedName]*tree.Gateway,
	httpRoutes map[types.NamespacedName]*tree.HTTPRoute,
	tlsRoutes map[types.NamespacedName]*tree.TLSRoute,
) StatusUpdater

type StatusUpdaterConf

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

func NewStatusUpdaterConf

func NewStatusUpdaterConf(
	k8sClient client.Client,
	extractGVK utilsk8s.ExtractGVK,
	controllerName string,
	logger *slog.Logger,
	disableIPv4 bool,
	disableIPv6 bool,
) StatusUpdaterConf

type StatusUpdaterImpl

type StatusUpdaterImpl struct {
	GatewayClasses map[types.NamespacedName]*tree.GatewayClass
	Gateways       map[types.NamespacedName]*tree.Gateway
	HTTPRoutes     map[types.NamespacedName]*tree.HTTPRoute
	TLSRoutes      map[types.NamespacedName]*tree.TLSRoute
	// contains filtered or unexported fields
}

func (*StatusUpdaterImpl) UpdateStatus

func (s *StatusUpdaterImpl) UpdateStatus(ctx context.Context)

Jump to

Keyboard shortcuts

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