Snowflake By Go.

Related tags

Web Frameworks snow
Overview

snow

LICENSE codecov GitHub Stars

Snowflake by Go.

package main

import "github.com/czasg/snow"

func main() {
    // default WorkID & DataCenterID is 0.
    snowID := snow.Next()
    
    // self-define WorkID / DataCenterID
    s := snow.Snow{
        WorkID:       1,
        DataCenterID: 2,
    }
    snowID = s.Next()
}
Owner
cza
Look for the truth. and Answer Is Python&Go!
cza
A simple to use Go (golang) package to generate or parse Twitter snowflake IDs

snowflake snowflake is a Go package that provides A very simple Twitter snowflake generator. Methods to parse existing snowflake IDs. Methods to conve

null 1.7k Dec 3, 2021
❄ An Lock Free ID Generator for Golang based on Snowflake Algorithm (Twitter announced).

❄ An Lock Free ID Generator for Golang based on Snowflake Algorithm (Twitter announced).

徐连波 150 Nov 26, 2021
✨ Generate unique IDs (Port of Node package "generate-snowflake" to Golang)

✨ Generate Snowflake Generate unique IDs. Inspired by Twitter's Snowflake system. ?? Installation Initialize your project (go mod init example.com/exa

Barış DEMİRCİ 6 Sep 19, 2021
Golang wrapper for the Snowflake Api.

GoSnowflakeApi GoSnowflakeApi is an api wrapper for the snowflake api written in golang for golang developers. Example package main import ( "fmt

SnowflakeDev Community 4 Jul 25, 2021
Snowflake By Go.

snow Snowflake by Go. package main import "github.com/czasg/snow" func main() { // default WorkID & DataCenterID is 0. snowID := snow.Next()

cza 1 Nov 24, 2021
Snowflake implemented in GO (Golang)

snowflake Snowflake is a fast, goroutine-safe unique ID generator built for distributed systems Key concepts Snowflake Snowflakes are int64s. uint64 i

Jacques Amsel 1 Nov 28, 2021