appctx

package
v0.0.0-...-bef5c4b Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: Apache-2.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const MaxRuntimeReleaseLength = 128

Variables

This section is empty.

Functions

func CreateRuntimeReleaseFromRequest

func CreateRuntimeReleaseFromRequest(request *http.Request, runtimeRelease string) string

func GetRuntimeRelease

func GetRuntimeRelease(appCtx ApplicationContext) string

func GetUserAgentFromRequest

func GetUserAgentFromRequest(request *http.Request) string

func LoadFirstFatalError

func LoadFirstFatalError(appCtx ApplicationContext) (customerError model.CustomerError, found bool)

func LoadInteropServer

func LoadInteropServer(appCtx ApplicationContext) interop.Server

func LoadInvokeErrorTraceData

func LoadInvokeErrorTraceData(appCtx ApplicationContext) *interop.InvokeErrorTraceData

func RequestWithAppCtx

func RequestWithAppCtx(request *http.Request, appCtx ApplicationContext) *http.Request

func StoreFirstFatalError

func StoreFirstFatalError(appCtx ApplicationContext, err model.CustomerError)

func StoreInteropServer

func StoreInteropServer(appCtx ApplicationContext, server interop.Server)

func StoreInvokeErrorTraceData

func StoreInvokeErrorTraceData(appCtx ApplicationContext, invokeError *interop.InvokeErrorTraceData)

func StoreResponseSender

func StoreResponseSender(appCtx ApplicationContext, server interop.InvokeResponseSender)

func UpdateAppCtxWithRuntimeRelease

func UpdateAppCtxWithRuntimeRelease(request *http.Request, appCtx ApplicationContext) bool

Types

type ApplicationContext

type ApplicationContext interface {
	Store(key Key, value interface{})
	Load(key Key) (value interface{}, ok bool)
	Delete(key Key)
	GetOrDefault(key Key, defaultValue interface{}) interface{}
	StoreIfNotExists(key Key, value interface{}) interface{}
}

func FromRequest

func FromRequest(request *http.Request) ApplicationContext

func NewApplicationContext

func NewApplicationContext() ApplicationContext

type Key

type Key int
const (
	AppCtxInvokeErrorTraceDataKey Key = iota

	AppCtxRuntimeReleaseKey

	AppCtxInteropServerKey

	AppCtxResponseSenderKey

	AppCtxFirstFatalErrorKey
)

type ReqCtxKey

type ReqCtxKey int
const ReqCtxApplicationContextKey ReqCtxKey = iota

Jump to

Keyboard shortcuts

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