appctx

package
v0.0.0-...-4fa2157 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

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