sequence

package
v0.0.0-...-c486877 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sequencer

type Sequencer interface {
	NextVal(appCtx appcontext.AppContext) (int64, error)
	SetVal(appCtx appcontext.AppContext, val int64) error
}

Sequencer provides an interface for generating sequence numbers.

func NewDatabaseSequencer

func NewDatabaseSequencer(sequenceName string) Sequencer

NewDatabaseSequencer is a factory for creating a new database-backed sequencer

func NewRandomSequencer

func NewRandomSequencer(min int64, max int64) (Sequencer, error)

NewRandomSequencer is a factory for creating a new random number sequencer

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL