snowflake

package module
v0.0.0-...-08a5273 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2018 License: MIT Imports: 5 Imported by: 0

README

snowflake

useage

node,_ := NewNode(1)
generateId := node.Generate().Int64()

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ID

type ID int64

func (ID) Base2

func (f ID) Base2() string

func (ID) Base64

func (f ID) Base64() string

func (ID) Bytes

func (f ID) Bytes() []byte

func (ID) Int64

func (f ID) Int64() int64

func (ID) Node

func (f ID) Node() int64

func (ID) Step

func (f ID) Step() int64

func (ID) String

func (f ID) String() string

func (ID) Time

func (f ID) Time() int64

type Node

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

func NewNode

func NewNode(node int64) (*Node, error)

func (*Node) Generate

func (n *Node) Generate() ID

Jump to

Keyboard shortcuts

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