duid

package
v0.0.0-...-cec3f95 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2017 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

duid means Distributed Unique Id. This package is a framework for generating unique id numbers such that the generation is fast and can be distributed across a network so that no two ids generated from different machines will be the same.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IdGenerator

type IdGenerator interface {
	NewId() int
}

IdGenerator produce distributed unique ids.

NewId produces the next new id from this IdGenerator.

func NewGenerator

func NewGenerator(uniqueKey uint) IdGenerator

NewGenerator creates a new Generator with the given uniqueKey for generating Ids across a distributed network.

Jump to

Keyboard shortcuts

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