Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PutRequestContextData ¶
func PutRequestContextData(targetCtx context.Context, data *RequestContextData) context.Context
PutRequestContextData puts the request's context data into the target context and returns the new context.
Types ¶
type RequestContextData ¶
type RequestContextData struct { ID string `json:"id,omitempty"` EntryTime time.Time `json:"entry_time,omitempty"` }
RequestContextData is the schema of a request's context. The request can be any network request.
func GetRequestContextData ¶
func GetRequestContextData(targetCtx context.Context) *RequestContextData
GetRequestContextData extracts the request's context data from the target context and returns it.
Click to show internal directories.
Click to hide internal directories.