Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustRegister ¶
Register makes a sequence generator available by the provided sequenceType. If Register is called twice with the same name or if driver is nil, it panics.
Types ¶
type Sequence ¶
type Sequence interface { // Open opens the sequence generator. Open() (err error) // NextSequence generates next sequence integer(unsigned 64bit). // If some error happens, err will not be nil and seq will be 0. // Else, err will be nil and next valid sequence integer will be in seq. NextSequence() (seq uint64, err error) // Close closes the sequence generator. Close() }
func GetSequence ¶
GetSequence returns corresponding sequence instance with the specified sequenceType. If the specified sequenceType does not register itself, then err will be non nil and sequence will be nil. Else, err will be nil and sequence will be corresponding sequence instance.
Click to show internal directories.
Click to hide internal directories.