Documentation ¶
Index ¶
Constants ¶
View Source
const ( MaxDatacenterID = -1 ^ (-1 << datacenterIDBits) MaxWorkerID = -1 ^ (-1 << workerIDBits) MaxSequence = -1 ^ (-1 << sequenceBits) )
Variables ¶
View Source
var ( ErrClockMovingBackwards = errors.New("the clock is moving backwards") ErrDatacenterIDOutOfRange = fmt.Errorf("datacenter id is out of range [0, %d]", MaxDatacenterID) ErrWorkerIDOutOfRange = fmt.Errorf("worker id is out of range [0, %d]", MaxWorkerID) )
Functions ¶
This section is empty.
Types ¶
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
func NewGenerator ¶
Click to show internal directories.
Click to hide internal directories.