id

package
v0.18.2 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2025 License: MIT, Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewOrderedID added in v0.17.0

func NewOrderedID() uint64

单机顺序id

func UniqueID added in v0.17.1

func UniqueID() string

Types

type RandomID added in v0.17.0

type RandomID [16]byte

func NewRandomID added in v0.17.0

func NewRandomID() RandomID

func (RandomID) IsValid added in v0.17.0

func (t RandomID) IsValid() bool

IsValid checks whether the trace TraceID is valid. A valid trace ID does not consist of zeros only.

func (RandomID) MarshalJSON added in v0.17.0

func (t RandomID) MarshalJSON() ([]byte, error)

MarshalJSON implements a custom marshal function to encode TraceID as a hex string.

func (RandomID) String added in v0.17.0

func (t RandomID) String() string

String returns the hex string representation form of a TraceID.

Jump to

Keyboard shortcuts

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