Documentation ¶ Index ¶ func Unique(prefix string) string type Ring func NewRing(min, max int) *Ring func NewShuffleRing(min, max int) *Ring func (r *Ring) Next() int func (r *Ring) Pull() int func (r *Ring) Push(n int) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func Unique ¶ func Unique(prefix string) string Unique 生成20位的唯一编号,每微秒可产生90W Types ¶ type Ring ¶ type Ring struct { Min int Max int // contains filtered or unexported fields } func NewRing ¶ func NewRing(min, max int) *Ring func NewShuffleRing ¶ func NewShuffleRing(min, max int) *Ring func (*Ring) Next ¶ func (r *Ring) Next() int func (*Ring) Pull ¶ func (r *Ring) Pull() int func (*Ring) Push ¶ func (r *Ring) Push(n int) Source Files ¶ View all Source files generator.go ring.go Click to show internal directories. Click to hide internal directories.