Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Generate ¶
Generate creates a UUID based on a hashed string derived from the input format and arguments. This function is used primarilty in generating the NGINX Id
Parameters:
- format: A format string, similar to fmt.Sprintf.
- a: Variadic arguments to be substituted into the format string.
Process:
- Creates a SHA-256 hash from the formatted string (using `fmt.Sprintf`).
- Converts the hash to a hexadecimal string.
- Generates an MD5-based UUID using the hashed string.
Returns:
A string representation of the generated UUID.
func GenerateMessageID ¶
func GenerateMessageID() string
GenerateMessageID generates a unique message ID, falling back to sha256 and timestamp if UUID generation fails.
Types ¶
type UUIDGenerator ¶
UUIDGenerator defines a function type for generating UUIDs.
Click to show internal directories.
Click to hide internal directories.