Documentation ¶
Overview ¶
Package uniqueid defines context.Context keys for obtaining system-wide unique identifiers.
Index ¶
Constants ¶
View Source
const ( // CtxGlobalUniqueID is a Context.Value key for a system-wide // unique identifier. CtxGlobalUniqueID contextID = iota // CtxGlobalUniqueIDProvider is a Context.Value key for a // system-wide unique identifier generator. CtxGlobalUniqueIDProvider // CtxInotifyCookie is a Context.Value key for a unique inotify // event cookie. CtxInotifyCookie )
Variables ¶
This section is empty.
Functions ¶
func GlobalFromContext ¶
GlobalFromContext returns a system-wide unique identifier from ctx.
func InotifyCookie ¶
InotifyCookie generates a unique inotify event cookie from ctx.
Types ¶
type Provider ¶
type Provider interface { // UniqueID returns a new unique identifier. UniqueID() uint64 }
Provider generates a sequence of unique identifiers useful for, among other things, lock ordering.
func GlobalProviderFromContext ¶
GlobalProviderFromContext returns a system-wide unique identifier from ctx.
Click to show internal directories.
Click to hide internal directories.