service

package
v0.0.0-...-e41513e Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PATH       = "/seqs/"
	UUID_KEY   = "/seqs/snowflake-uuid"
	BACKOFF    = 100  // max backoff delay millisecond
	CONCURRENT = 128  // max concurrent connections to etcd
	UUID_QUEUE = 1024 // uuid process queue
)
View Source
const (
	TS_MASK         = 0x1FFFFFFFFFF // 41bit
	SN_MASK         = 0xFFF         // 12bit
	MACHINE_ID_MASK = 0x3FF         // 10bit
)

Variables

View Source
var (
	Conf *idgenConfig
)

Functions

func InitializeConfig

func InitializeConfig() (err error)

func NewIDGenServer

func NewIDGenServer() *idgenServer

Types

type Etcd

type Etcd struct {
	EtcCli *clientv3.Client
	// contains filtered or unexported fields
}

func NewEtcd

func NewEtcd(c *etcdConf) (etcd *Etcd, err error)

Jump to

Keyboard shortcuts

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