Documentation ¶
Index ¶
- Constants
- Variables
- func Copy(source context.Context, target context.Context) context.Context
- func FromCtxToMsgHeader(ctx context.Context, header *nats.Header) error
- func FromMsgHeaderToCtx(ctx context.Context, header nats.Header) (context.Context, error)
- func Get(ctx context.Context, key string) string
- func Set(ctx context.Context, key string, value string) context.Context
- type Values
Constants ¶
View Source
const NatsCompatHeader = "Shar-Compat"
NatsCompatHeader is the name of the header used to pass the compatible version of SHAR.
View Source
const NatsVersionHeader = "Shar-Version"
NatsVersionHeader is the name of the header used to pass the SHAR client version.
View Source
const SharNamespace = "Shar-Namespace"
SharNamespace is the name of the header used to pass the client's declared namespace.
Variables ¶
View Source
var ContextKey contextKey = "SHARHeader"
ContextKey is the key for SHAR header values in the context.
Functions ¶
func FromCtxToMsgHeader ¶ added in v1.0.400
FromCtxToMsgHeader attaches context information to a NATS message header.
func FromMsgHeaderToCtx ¶ added in v1.0.400
FromMsgHeaderToCtx attaches NATS message header values to the context.
Types ¶
Click to show internal directories.
Click to hide internal directories.