Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RequestDataStoreKey requestDataStoreKeyType
Functions ¶
Types ¶
type ContextData ¶
func (ContextData) GetData ¶
func (ds ContextData) GetData() ContextData
func (ContextData) MergeFrom ¶
func (ds ContextData) MergeFrom(other ContextData) ContextData
type ContextDataProvider ¶
type ContextDataProvider interface {
GetData() ContextData
}
type RequestContext ¶
type RequestContext interface { context.Context RequestDataStore }
func FromContext ¶
func FromContext(ctx context.Context) RequestContext
func NewRequestContextForTest ¶
func NewRequestContextForTest(parentCtx context.Context) RequestContext
NewRequestContextForTest creates a new RequestContext for testing purposes It doesn't add the context to the process manager, nor do cleanup
type RequestDataStore ¶
type RequestDataStore interface { GetData() ContextData SetContextValue(k, v any) GetContextValue(key any) any AddCleanUp(f func()) AddCloser(c io.Closer) }
RequestDataStore is a short-lived context-related object that is used to store request-specific data.
func GetRequestDataStore ¶
func GetRequestDataStore(ctx context.Context) RequestDataStore
Click to show internal directories.
Click to hide internal directories.