Documentation
¶
Index ¶
Constants ¶
const ( // ConditionTypeBackendsProgrammed is a condition type for Routes // that indicates whether all backends are programmed. ConditionTypeBackendsProgrammed = "BackendsProgrammed" // ConditionReasonBackendsProgrammed is a condition reason for Routes // that indicates all backends are programmed. ConditionReasonBackendsProgrammed = "BackendsProgrammed" // ConditionReasonBackendsNotProgrammed is a condition reason for Routes // that indicates not all backends are programmed. ConditionReasonBackendsNotProgrammed = "BackendsNotProgrammed" )
Backends-related conditions for Routes
const ( // ConditionTypeRoutesProgrammed is a condition type for Routes // that indicates whether all routes are programmed to the gateway. ConditionTypeRoutesProgrammed = "RoutesProgrammed" // ConditionReasonRoutesProgrammed is a condition reason for Routes // that indicates all routes are programmed to the gateway. ConditionReasonRoutesProgrammed = "RoutesProgrammed" // ConditionReasonRoutesNotProgrammed is a condition reason for Routes // that indicates not all routes are programmed to the gateway. ConditionReasonRoutesNotProgrammed = "RoutesNotProgrammed" )
Routing-related conditions for Routes
const HTTPRouteKey = "HTTPRoute"
HTTPRouteKey identifies HTTPRoute resources.
Variables ¶
This section is empty.
Functions ¶
func StatusMapKey ¶
StatusMapKey generates a unique key for a route-gateway pair routeKind: "HTTPRoute", "GRPCRoute", etc. routeNN: "namespace/name" of the route gatewayNN: "namespace/name" of the gateway
Types ¶
type RouteObject ¶
RouteObject is a constraint for supported route types.
type RouteObjectPtr ¶
type RouteObjectPtr[T RouteObject] interface { *T client.Object }
RouteObjectPtr is a constraint for pointers to supported route types.
type RouteStatusUpdater ¶
type RouteStatusUpdater interface { // ComputeStatus computes the status of the route object. ComputeStatus() // EnforceStatus enforces the computed status on the route object. EnforceStatus(ctx context.Context) (op.Result, error) }
RouteStatusUpdater computes and enforces the status of a route object.
func NewRouteStatusUpdater ¶
func NewRouteStatusUpdater[t RouteObject](obj t, cl client.Client, logger logr.Logger, sharedStatusMap *SharedRouteStatusMap) (RouteStatusUpdater, error)
NewRouteStatusUpdater returns a RouteStatusUpdater for the given route object.
type ServiceControllerStatus ¶
ServiceControllerStatus holds the status of a service as managed by a specific controller
type SharedRouteStatus ¶
type SharedRouteStatus struct {
}SharedRouteStatus holds the status of services associated with a specific route-gateway pair
type SharedRouteStatusMap ¶
type SharedRouteStatusMap struct {}
SharedRouteStatusMap is a thread-safe map to store the status of routes shared across multiple gateways
func NewSharedStatusMap ¶
func NewSharedStatusMap() *SharedRouteStatusMap
NewSharedStatusMap initializes a new SharedRouteStatusMap
func (*SharedRouteStatusMap) GetProgrammedServices ¶
func (s *SharedRouteStatusMap) GetProgrammedServices(key string, serviceNN string) (n int, initiated bool)
GetProgrammedServices retrieves the number of programmed backends and initialization status for a service associated with a specific route-gateway pair
func (*SharedRouteStatusMap) UpdateProgrammedServices ¶
func (s *SharedRouteStatusMap) UpdateProgrammedServices(service corev1.Service, key string, programmedBackends int)
UpdateProgrammedServices updates the status of a service for a specific route-gateway pair