snowflake

package
v0.0.0-...-d108363 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Factory

func Factory(loader func(v interface{}) error) (uniqueid.Driver, error)

Factory snow flake driver factory

Types

type SnowFlake

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

SnowFlake snow flake driver

func NewSnowFlake

func NewSnowFlake() *SnowFlake

NewSnowFlake create new snow flake driver

func (*SnowFlake) GenerateID

func (s *SnowFlake) GenerateID() (string, error)

GenerateID generate unique id. Return generated id and any error if rasied.

type SnowFlakeConfig

type SnowFlakeConfig struct {
	Node int64
}

Jump to

Keyboard shortcuts

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