Documentation ¶
Index ¶
- func Background() types.Context
- func Client(ctx context.Context) (types.Client, error)
- func HTTPRequest(ctx context.Context) *http.Request
- func InstanceID(ctx context.Context) (*types.InstanceID, error)
- func InstanceIDsByService(ctx context.Context) (map[string]*types.InstanceID, error)
- func LocalDevices(ctx context.Context) (tval map[string]string, err error)
- func LocalDevicesByService(ctx context.Context) (map[string]map[string]string, error)
- func Profile(ctx context.Context) (string, error)
- func Route(ctx context.Context) (string, error)
- func ServerName(ctx context.Context) (string, error)
- func ServiceName(ctx context.Context) (string, error)
- func TransactionCreated(ctx context.Context) (time.Time, error)
- func TransactionID(ctx context.Context) (string, error)
- func WithClient(parent context.Context, val types.Client) types.Context
- func WithContextID(parent context.Context, id, val string) types.Context
- func WithContextSID(parent context.Context, id fmt.Stringer, value string) types.Context
- func WithHTTPRequest(ctx types.Context, val *http.Request) types.Context
- func WithInstanceID(parent context.Context, val *types.InstanceID) types.Context
- func WithInstanceIDsByService(parent context.Context, val map[string]*types.InstanceID) types.Context
- func WithLocalDevices(parent context.Context, val map[string]string) types.Context
- func WithLocalDevicesByService(parent context.Context, val map[string]map[string]string) types.Context
- func WithProfile(parent context.Context, val string) types.Context
- func WithRoute(parent context.Context, val string) types.Context
- func WithServiceName(parent context.Context, val string) types.Context
- func WithTransactionCreated(parent context.Context, val time.Time) types.Context
- func WithTransactionID(parent context.Context, val string) types.Context
- func WithValue(parent context.Context, key interface{}, val interface{}) types.Context
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HTTPRequest ¶
HTTPRequest returns the *http.Request associated with ctx using NewContext.
func InstanceID ¶
func InstanceID(ctx context.Context) (*types.InstanceID, error)
InstanceID gets the context's instance ID.
func InstanceIDsByService ¶
InstanceIDsByService gets the context's service to instance IDs map.
func LocalDevices ¶
LocalDevices gets the context's local devices map.
func LocalDevicesByService ¶
LocalDevicesByService gets the context's service to local devices map.
func ServerName ¶
ServerName returns the context's server name.
func ServiceName ¶
ServiceName returns the name of the context's service.
func TransactionCreated ¶
TransactionCreated gets the context's transaction created timstamp.
func TransactionID ¶
TransactionID gets the context's transaction ID.
func WithClient ¶
WithClient returns a context with the provided client.
func WithContextID ¶
WithContextID returns a context with the provided context ID information. The context ID is often used with logging to identify a log statement's origin.
func WithContextSID ¶
WithContextSID is the same as the WithContextID function except this variant only accepts fmt.Stringer values for its id argument.
func WithHTTPRequest ¶
WithHTTPRequest returns a context with the provided HTTP request.
func WithInstanceID ¶
WithInstanceID returns a context with the provided instance ID.
func WithInstanceIDsByService ¶
func WithInstanceIDsByService( parent context.Context, val map[string]*types.InstanceID) types.Context
WithInstanceIDsByService returns a context with the provided instance ID map.
func WithLocalDevices ¶
WithLocalDevices returns a context with the provided local devices map.
func WithLocalDevicesByService ¶
func WithLocalDevicesByService( parent context.Context, val map[string]map[string]string) types.Context
WithLocalDevicesByService returns a context with the provided service to
instance ID map.
func WithProfile ¶
WithProfile returns a context with the provided profile.
func WithServiceName ¶
WithServiceName returns a contex with the provided service name.
func WithTransactionCreated ¶
WithTransactionCreated returns a context with the provided transaction created timestamp.
func WithTransactionID ¶
WithTransactionID returns a context with the provided transaction ID.
Types ¶
This section is empty.