util

package
v0.0.0-...-8f5302c Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2020 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenUUID

func GenUUID(serviceID int32, containerID int32, sequenceID int32) int64

GenUUID generate a 64bit UUID.

Detail format: |--------|-------------------|------------------------|---------------------------------| | 0 | 0........0 | 0....................0 | 0.............................0 | |--------|-------------------|------------------------|---------------------------------| | (1bit) | (10bit) serviceID | (22bit) containerID | (31bit) sequenceID | |--------|-------------------|------------------------|---------------------------------|

func GetContainerName

func GetContainerName() string

GetContainerName get container name from docker process.

func Max

func Max(x, y int) int

Max return the biggest number of x, y

func Min

func Min(x, y int) int

Min return the smallest number of x, y

Types

This section is empty.

Jump to

Keyboard shortcuts

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