util

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2026 License: Apache-2.0 Imports: 8 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContextWithFallbackURL added in v0.14.0

func ContextWithFallbackURL(ctx context.Context, url *url.URL) context.Context

func ContextWithInterceptorRoute added in v0.14.0

func ContextWithInterceptorRoute(ctx context.Context, ir *httpv1beta1.InterceptorRoute) context.Context

func ContextWithLogger

func ContextWithLogger(ctx context.Context, logger logr.Logger) context.Context

func ContextWithUpstreamURL added in v0.14.0

func ContextWithUpstreamURL(ctx context.Context, url *url.URL) context.Context

func FallbackURLFromContext added in v0.14.0

func FallbackURLFromContext(ctx context.Context) *url.URL

func InterceptorRouteFromContext added in v0.14.0

func InterceptorRouteFromContext(ctx context.Context) *httpv1beta1.InterceptorRoute

func IsIgnoredErr added in v0.6.0

func IsIgnoredErr(err error) bool

func IsNil

func IsNil(i any) bool

func LoggerFromContext

func LoggerFromContext(ctx context.Context) logr.Logger

func RequestWithLogger

func RequestWithLogger(r *http.Request, logger logr.Logger) *http.Request

func RequestWithLoggerWithName

func RequestWithLoggerWithName(r *http.Request, name string) *http.Request

func RequestWithUpstreamURL added in v0.14.0

func RequestWithUpstreamURL(r *http.Request, url *url.URL) *http.Request

func UpstreamURLFromContext added in v0.14.0

func UpstreamURLFromContext(ctx context.Context) *url.URL

Types

type AtomicValue

type AtomicValue[V any] struct {
	// contains filtered or unexported fields
}

func NewAtomicValue

func NewAtomicValue[V any](v V) *AtomicValue[V]

func (*AtomicValue[V]) Get

func (av *AtomicValue[V]) Get() V

func (*AtomicValue[V]) Set

func (av *AtomicValue[V]) Set(v V)

type HealthChecker

type HealthChecker interface {
	HealthCheck(ctx context.Context) error
}

type HealthCheckerFunc

type HealthCheckerFunc func(ctx context.Context) error

func (HealthCheckerFunc) HealthCheck

func (f HealthCheckerFunc) HealthCheck(ctx context.Context) error

type Signaler

type Signaler interface {
	Signal()
	Wait(ctx context.Context) error
}

func NewSignaler

func NewSignaler() Signaler

Jump to

Keyboard shortcuts

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