Sovite.Queue.ID (sovite v0.2.0)

Copy Markdown View Source

Queue IDs: 14 characters from [0-9A-Za-z], safe in file names.

The first 9 characters encode the creation time in microseconds and the last 5 are random, so IDs are unique and sort by creation time.

Summary

Functions

Generates a new queue ID.

Returns true if id has the format of a queue ID.

Functions

generate()

@spec generate() :: String.t()

Generates a new queue ID.

valid?(id)

@spec valid?(term()) :: boolean()

Returns true if id has the format of a queue ID.