Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
New generates a composite hash for the given text and time.
The function computes a hash value of the text using the FNV-1a hash function, which is fast and provides good enough distribution for our purposes. The hash value is then combined with the time, expressed in milliseconds since the epoch, to generate a unique identifier. The resulting identifier is guaranteed to be unique and sortable for the given text and time.
Parameters:
- text: the text to generate a composite hash for.
- atime: the time to use in generating the composite hash.
Returns:
- int64: the composite hash for the given text and time.
- error: if there was an error computing the hash value of the text.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.