guid

package
v0.0.0-...-5bac610 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2015 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

View Source
const MAX_UINT uint16 = 0xFFFF

Variables

View Source
var SECTION uint64 = 10
View Source
var ZKPATH = "/guid/incid"

Functions

This section is empty.

Types

type Guid

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

func NewGuid

func NewGuid() (*Guid, error)

*

  • 只会用到这个workId的前三个字节

func (*Guid) Generate

func (this *Guid) Generate() (uint64, error)

GUID = TimeStamp(32bit) + workId(16bit) + IncNo(16bit)

type IncId

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

func NewIncId

func NewIncId() (*IncId, error)

func (*IncId) Generate

func (this *IncId) Generate() (uint64, error)

Jump to

Keyboard shortcuts

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