context

package
v2.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package context manages the insertion of Request-specific information (which cache to use, etc.) into proxied HTTP requests

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearResources

func ClearResources(ctx context.Context) context.Context

ClearResources removes Resources from the context

func HealthCheckFlag

func HealthCheckFlag(ctx context.Context) bool

HealthCheckFlag returns true if the request is a health check request

func Hops

func Hops(ctx context.Context) (int32, int32)

Hops returns the Hops data associated with the request

func IncrementedRewriterHops

func IncrementedRewriterHops(ctx context.Context, i int32) int32

IncrementedRewriterHops returns the current incremented hop count from the ctx

func Resources

func Resources(ctx context.Context) any

Resources returns the interface reference to the Request's resources

func RewriterHops

func RewriterHops(ctx context.Context) int32

RewriterHops returns the RewriterHops data associated with the request

func StartRewriterHops

func StartRewriterHops(ctx context.Context) context.Context

StartRewriterHops returns a context with rewriterHopsKey = 0

func WithHealthCheckFlag

func WithHealthCheckFlag(ctx context.Context, isHealthCheck bool) context.Context

WithHealthCheckFlag returns a copy of the provided context that also includes a bit indicating the request is performing a health check

func WithHops

func WithHops(ctx context.Context, current, maxHops int32) context.Context

WithHops returns a copy of the provided context that also includes rule-based Hop information about the request

func WithResources

func WithResources(ctx context.Context, r any) context.Context

WithResources returns a copy of the provided context that also includes the BackendOptions, CachingConfig and PathConfig for the request

Types

This section is empty.

Jump to

Keyboard shortcuts

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