Documentation
¶
Overview ¶
Package sequence provides a performant goro-safe incrementing sequencer, with randomized HashID-encoding of the values to work as a font of IDs for errors, requests, etc.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Seq ¶
type Seq struct {
// contains filtered or unexported fields
}
Seq is a sequencer. It should never be used by default, and instead obtained via a New function
func NewWithHashIDLength ¶
NewWithHashIDLength returns an initilized Seq with the minimum hashID length set as specified
func (*Seq) NextHashID ¶
NextHashID returns the hashID-encoded value of the next int in the sequence
Click to show internal directories.
Click to hide internal directories.