id

package
v0.0.0-...-ac3b76c Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IndexOffset     = 0
	TimestampOffset = 16
	ServerIDOffset  = 48
)
View Source
const (
	IndexBits     = 16
	TimestampBits = 32
	ServerIDBits  = 16
)

Variables

This section is empty.

Functions

func GetBits

func GetBits(val uint64, bits uint64, offset uint64) uint64

func GetStringID

func GetStringID() string

func Mask

func Mask(bits uint64, offset uint64) uint64

func SetBits

func SetBits(oldVal uint64, bits uint64, offset uint64, val uint64) uint64

Types

type ID

type ID uint64

func (ID) GetIndex

func (id ID) GetIndex() uint16

func (ID) GetServerID

func (id ID) GetServerID() uint16

func (ID) GetTimestamp

func (id ID) GetTimestamp() uint64

type Maker

type Maker interface {
	ServerID() uint32
	SetServerID(uint32)
	Make() ID
}
var Make Maker

func NewMaker

func NewMaker(serverID uint32) Maker

Jump to

Keyboard shortcuts

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