infoutil

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2022 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 2 more Imports: 6 Imported by: 0

Documentation

Overview

util

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTransportAddr

func GetTransportAddr() (string, error)

func SetDistributedNode

func SetDistributedNode(d *DistributedId)

Types

type DistributedId

type DistributedId struct {
	Node      *snowflake.Node
	MachineId int64
}

func GetDistributedNode

func GetDistributedNode() *DistributedId

func NewDistributedId

func NewDistributedId(machineId int64) (*DistributedId, error)

func (*DistributedId) Generate

func (d *DistributedId) Generate() snowflake.ID

func (*DistributedId) ParseId

func (d *DistributedId) ParseId(id interface{}) (snowflake.ID, error)

Jump to

Keyboard shortcuts

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