number

package
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetShardIDFromStringID

func GetShardIDFromStringID(id string) int64

GetShardIDFromStringID parses an string ID into a StringShardID object

func NewStringID

func NewStringID() string

NewStringID returns a new string ID

Types

type IntShardID

type IntShardID struct {
	SrcID   int64
	ShardID int64
	TypeID  int64
	LocalID int64
}

IntShardID is a numeric unique identifier that includes shard information

func BuildIntShardID

func BuildIntShardID(shardID, typeID, localID int64) IntShardID

BuildIntShardID builds an integer ID

func ParseIntShardID

func ParseIntShardID(id int64) IntShardID

ParseIntShardID parses an intID into a ShardID object

type StringShardID

type StringShardID struct {
	SrcID   string
	ShardID int64
	TypeID  int64
	LocalID int64
}

StringShardID is a string unique identifier that includes shard information

Jump to

Keyboard shortcuts

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