context

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2021 License: Apache-2.0 Imports: 2 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 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) (current, max int)

Hops returns the Hops data associated with the request

func Resources

func Resources(ctx context.Context) interface{}

Resources returns the interface reference to the Request's resources

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, max int) 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 interface{}) context.Context

WithResources returns a copy of the provided context that also includes the OriginConfig, 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