route

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package route provides domain-specific, field-level caching for Route resources. RouteCache embeds cache.ObjectCache and adds typed Set* / Get* helpers for each resolved spec field (host, enabled, path, tlsEnabled, runtime, serviceUnitRefName), plus PublishResolved, which projects a *routeResolution.ResolvedRoute into those fields. Only the ServiceUnit reference's name is cached — the controller derives the ksvc name by convention (ksvc name == ServiceUnit name), so no status lookup is needed.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RouteCache

type RouteCache struct {
	*bocache.ObjectCache
}

RouteCache provides domain-specific, field-level caching for Route resources.

func NewRouteCache

func NewRouteCache(c *cache.Cache) *RouteCache

NewRouteCache constructs a new RouteCache with the provided cache.Cache.

func (*RouteCache) GetEnabled

func (r *RouteCache) GetEnabled(ctx context.Context, nn types.NamespacedName, gen int64) (bool, bool, error)

func (*RouteCache) GetHost

func (r *RouteCache) GetHost(ctx context.Context, nn types.NamespacedName, gen int64) (string, bool, error)

func (*RouteCache) GetPath

func (r *RouteCache) GetPath(ctx context.Context, nn types.NamespacedName, gen int64) (string, bool, error)

func (*RouteCache) GetRuntime

func (r *RouteCache) GetRuntime(ctx context.Context, nn types.NamespacedName, gen int64) (string, bool, error)

func (*RouteCache) GetServiceUnitRefName

func (r *RouteCache) GetServiceUnitRefName(ctx context.Context, nn types.NamespacedName, gen int64) (string, bool, error)

GetServiceUnitRefName retrieves the cached ServiceUnit name for this Route.

func (*RouteCache) GetTLSEnabled

func (r *RouteCache) GetTLSEnabled(ctx context.Context, nn types.NamespacedName, gen int64) (bool, bool, error)

func (*RouteCache) PublishResolved

func (r *RouteCache) PublishResolved(ctx context.Context, nn types.NamespacedName, gen int64, res *routeResolution.ResolvedRoute) error

PublishResolved writes the resolved contract as a generation-scoped, field-level projection. All writes are best-effort: failures cost queryability, never correctness. Returns the first error encountered for optional logging; callers should not fail reconciliation on it.

func (*RouteCache) SetEnabled

func (r *RouteCache) SetEnabled(ctx context.Context, nn types.NamespacedName, gen int64, enabled bool) error

func (*RouteCache) SetHost

func (r *RouteCache) SetHost(ctx context.Context, nn types.NamespacedName, gen int64, host string) error

func (*RouteCache) SetPath

func (r *RouteCache) SetPath(ctx context.Context, nn types.NamespacedName, gen int64, path string) error

func (*RouteCache) SetRuntime

func (r *RouteCache) SetRuntime(ctx context.Context, nn types.NamespacedName, gen int64, runtime string) error

func (*RouteCache) SetServiceUnitRefName

func (r *RouteCache) SetServiceUnitRefName(ctx context.Context, nn types.NamespacedName, gen int64, name string) error

SetServiceUnitRefName caches the ServiceUnit name bound to this Route. Stored as a string field — the controller derives the ksvc name by convention (ksvc name == ServiceUnit name) without a status lookup.

func (*RouteCache) SetTLSEnabled

func (r *RouteCache) SetTLSEnabled(ctx context.Context, nn types.NamespacedName, gen int64, tlsEnabled bool) error

Jump to

Keyboard shortcuts

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