meshutil

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2019 License: MIT Imports: 7 Imported by: 5

Documentation

Index

Constants

View Source
const (
	MaxNumFInt64 = 16
)

Variables

This section is empty.

Functions

func ApplyFlagFromFile

func ApplyFlagFromFile(fs *flag.FlagSet, filename string) error

func ParseSizeString

func ParseSizeString(sizeStr string) (size int, err error)

func WildcardPatternMatch

func WildcardPatternMatch(str, pattern string) bool

Function that matches input str with given wildcard pattern

Types

type UUID64Component

type UUID64Component struct {
	ValueSrc func() uint64 // 数值来源
	NumF     uint          // 占用多少个F 1个F=0.5个字节=4位
}

type UUID64Generator

type UUID64Generator struct {
	// contains filtered or unexported fields
}

func NewUUID64Generator

func NewUUID64Generator() *UUID64Generator

func (*UUID64Generator) AddComponent

func (self *UUID64Generator) AddComponent(com *UUID64Component)

func (*UUID64Generator) AddSeqComponent

func (self *UUID64Generator) AddSeqComponent(numF uint)

序列号组件

func (*UUID64Generator) AddTimeComponent

func (self *UUID64Generator) AddTimeComponent(numF uint)

添加时间组件

func (*UUID64Generator) Generate

func (self *UUID64Generator) Generate() (ret uint64)

按给定的组件规则生成一个UUID

func (*UUID64Generator) LeftNumF

func (self *UUID64Generator) LeftNumF() (ret uint)

func (*UUID64Generator) UsedNumF

func (self *UUID64Generator) UsedNumF() (ret uint)

Jump to

Keyboard shortcuts

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