package uniqueid
import "gvisor.dev/gvisor/pkg/sentry/uniqueid"
Package uniqueid defines context.Context keys for obtaining system-wide unique identifiers.
Index ¶
- Constants
- func GlobalFromContext(ctx context.Context) uint64
- func InotifyCookie(ctx context.Context) uint32
- type Provider
Constants ¶
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 )
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.
Source Files ¶
context.go
- Version
- v0.0.0-20250802011938-fc9c972fa636 (latest)
- Published
- Aug 2, 2025
- Platform
- linux/amd64
- Imports
- 1 packages
- Last checked
- 1 hour ago –
Tools for package owners.