uuid

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2022 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(serverNode int64) error

func NextID

func NextID() int64

Types

type Generator added in v0.2.0

type Generator interface {
	NextID() (int64, error)
}

type SegmentWorker added in v0.2.0

type SegmentWorker struct {
	// contains filtered or unexported fields
}

func NewSegmentWorker added in v0.2.0

func NewSegmentWorker(db *sql.DB, len int, biz string) (*SegmentWorker, error)

func (*SegmentWorker) NextID added in v0.2.0

func (w *SegmentWorker) NextID() (int64, error)

func (*SegmentWorker) ProduceID added in v0.2.0

func (w *SegmentWorker) ProduceID()

type SnowflakeWorker added in v0.2.0

type SnowflakeWorker struct {
	// contains filtered or unexported fields
}

func NewWorker added in v0.2.0

func NewWorker() (*SnowflakeWorker, error)

func (*SnowflakeWorker) NextID added in v0.2.0

func (w *SnowflakeWorker) NextID() (int64, error)

Jump to

Keyboard shortcuts

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