ContextValues
Defined in: packages/pubsub/src/context-values.ts:8
ContextValues provides a bag for passing arbitrary data through the interceptor chain and to handlers within a single delivery.
Unlike CloudEvent metadata (which crosses process boundaries), contextValues is an in-process carrier for things like trace IDs, user authentication, or reentry guards.
Methods
Section titled “Methods”delete()
Section titled “delete()”delete(
key):this
Defined in: packages/pubsub/src/context-values.ts:22
delete deletes a context value. It returns the ContextValues to allow chaining.
Parameters
Section titled “Parameters”ContextKey<unknown>
Returns
Section titled “Returns”this
get<
T>(key):T
Defined in: packages/pubsub/src/context-values.ts:12
get returns a context value.
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”ContextKey<T>
Returns
Section titled “Returns”T
set<
T>(key,value):this
Defined in: packages/pubsub/src/context-values.ts:17
set sets a context value. It returns the ContextValues to allow chaining.
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”ContextKey<T>
T
Returns
Section titled “Returns”this