Documentation
¶
Index ¶
- func ExtendTimeout(ctx context.Context, timeout time.Duration) (context.Context, context.CancelFunc)
- func GetDeviceID(ctx context.Context) string
- func GetTraceID(ctx context.Context) string
- func SetDeviceID(ctx context.Context, deviceID string) context.Context
- func SetTraceID(ctx context.Context, traceID string) context.Context
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtendTimeout ¶
func ExtendTimeout(ctx context.Context, timeout time.Duration) (context.Context, context.CancelFunc)
ExtendTimeout creates a fresh context with the given timeout and carries over known values from the original context. It works both for adding a timeout to contexts without one and for replacing/extending an existing timeout.
func GetDeviceID ¶
GetDeviceID gets the device ID from the context.
func GetTraceID ¶
GetTraceID gets the trace ID from the context.
func SetDeviceID ¶
SetDeviceID sets the device ID in the context.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.