Documentation
¶
Index ¶
- func ApplyContext(f func(ctx context.Context) error, ctx context.Context) func() error
- func ContextWithHTTPSO(ctx context.Context, httpso *httpv1alpha1.HTTPScaledObject) context.Context
- func ContextWithLogger(ctx context.Context, logger logr.Logger) context.Context
- func ContextWithStream(ctx context.Context, url *url.URL) context.Context
- func DeapplyError(f func(), err error) func() error
- func HTTPSOFromContext(ctx context.Context) *httpv1alpha1.HTTPScaledObject
- func IgnoringError(f func() error)
- func IsIgnoredErr(err error) bool
- func IsNil(i interface{}) bool
- func LoggerFromContext(ctx context.Context) logr.Logger
- func RequestWithHTTPSO(r *http.Request, httpso *httpv1alpha1.HTTPScaledObject) *http.Request
- func RequestWithLogger(r *http.Request, logger logr.Logger) *http.Request
- func RequestWithLoggerWithName(r *http.Request, name string) *http.Request
- func RequestWithStream(r *http.Request, stream *url.URL) *http.Request
- func ResolveOsEnvBool(envName string, defaultValue bool) (bool, error)
- func ResolveOsEnvDuration(envName string) (*time.Duration, error)
- func ResolveOsEnvInt(envName string, defaultValue int) (int, error)
- func StreamFromContext(ctx context.Context) *url.URL
- func WithTimeout(d time.Duration, f func() error) error
- type AtomicValue
- type HealthChecker
- type HealthCheckerFunc
- type Signaler
- type Stopwatch
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyContext ¶
func ContextWithHTTPSO ¶
func ContextWithHTTPSO(ctx context.Context, httpso *httpv1alpha1.HTTPScaledObject) context.Context
func ContextWithLogger ¶
func DeapplyError ¶
func HTTPSOFromContext ¶
func HTTPSOFromContext(ctx context.Context) *httpv1alpha1.HTTPScaledObject
func IgnoringError ¶
func IgnoringError(f func() error)
func IsIgnoredErr ¶ added in v0.6.0
func RequestWithHTTPSO ¶
func RequestWithHTTPSO(r *http.Request, httpso *httpv1alpha1.HTTPScaledObject) *http.Request
func ResolveOsEnvBool ¶ added in v0.6.0
func ResolveOsEnvDuration ¶ added in v0.6.0
func ResolveOsEnvInt ¶ added in v0.6.0
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 HealthCheckerFunc ¶
func (HealthCheckerFunc) HealthCheck ¶
func (f HealthCheckerFunc) HealthCheck(ctx context.Context) error
type Signaler ¶
func NewSignaler ¶
func NewSignaler() Signaler
type Stopwatch ¶
type Stopwatch struct {
// contains filtered or unexported fields
}
func (*Stopwatch) ElapsedTime ¶
Click to show internal directories.
Click to hide internal directories.