userver: utils::generators Namespace Reference
Loading...
Searching...
No Matches
utils::generators Namespace Reference

Detailed Description

Generators.

Functions

boost::uuids::uuid GenerateBoostUuid ()
 Generates UUIDv4.
 
boost::uuids::uuid GenerateBoostUuidV7 ()
 Generates UUIDv7.
 
std::string GenerateUuid ()
 Generate a UUIDv4 string.
 
std::string GenerateUuidV7 ()
 Generate a UUIDv7 string.
 

Function Documentation

◆ GenerateBoostUuidV7()

boost::uuids::uuid utils::generators::GenerateBoostUuidV7 ( )

Generates UUIDv7.

Uses 22-bit counter to ensure UUID's monotonicity in generated batches (or for UUID's generated for the same timestamp). See RFC for detailed UUID format info: https://datatracker.ietf.org/doc/html/draft-ietf-uuidrev-rfc4122bis#name-uuid-version-7