Sonyflake.next_id
You're seeing just the function
next_id
, go back to Sonyflake module for more information.
Link to this function
next_id(sonyflake)
Specs
next_id(%Sonyflake{ elapsed_time: non_neg_integer(), machine_id: non_neg_integer(), msb: non_neg_integer(), sequence: non_neg_integer(), start_time: non_neg_integer() }) :: {:ok, %Sonyflake{ elapsed_time: non_neg_integer(), machine_id: non_neg_integer(), msb: non_neg_integer(), sequence: non_neg_integer(), start_time: non_neg_integer() }, non_neg_integer()}
Generates and returns the next unique ID.
Raises a TimeoutError
after the SonyFlake
time overflows.