utils

package
v2.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromUnstructured

func FromUnstructured(in unstructured.Unstructured, out client.Object) error

FromUnstructured converts an unstructured.Unstructured object to a typed client.Object. It returns an error if the conversion fails.

func HTTPBackendRefsToBackendRefs added in v2.2.0

func HTTPBackendRefsToBackendRefs(refs []gwtypes.HTTPBackendRef) []gwtypes.BackendRef

HTTPBackendRefsToBackendRefs unwraps []HTTPBackendRef to []BackendRef.

func Hash32

func Hash32(obj any) string

Hash32 returns a hash string representation of the given object using FNV-1a hashing.

func Hash64

func Hash64(obj any) string

Hash64 returns a hash string representation of the given object using FNV-1a hashing.

func HostnameIntersection added in v2.1.1

func HostnameIntersection(listenerHostname, routeHostname string) (string, bool)

HostnameIntersection returns the most specific hostname that satisfies both constraints and whether an intersection exists. Empty input hostnames are treated as the Gateway API match-any wildcard ("*").

func ToUnstructured

func ToUnstructured(obj client.Object, scheme *runtime.Scheme) (unstructured.Unstructured, error)

ToUnstructured converts a client.Object to an unstructured.Unstructured object. It infers TypeMeta using the provided scheme if not set. Returns the unstructured object and any error encountered during conversion.

Types

This section is empty.

Jump to

Keyboard shortcuts

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