utils

package
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2019 License: Apache-2.0, Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const FLUSH_INTERVAL = 5 * time.Second // statistic cycle
View Source
const (
	FUNC_MAX_NUM = iota
)

Variables

This section is empty.

Functions

func CheckIPAddrSlc

func CheckIPAddrSlc(str string) bool

func CheckItfcNil

func CheckItfcNil(itfc interface{}) bool

func CheckNumber

func CheckNumber(str string) bool

func EnsureDir

func EnsureDir(dir string, mode os.FileMode) error

func FileExists

func FileExists(filename string) bool

func OnlyNumLetterUnderline

func OnlyNumLetterUnderline(str string) bool

func PathExists

func PathExists(path string) (bool, error)

func ReadFileDataFromCmd

func ReadFileDataFromCmd(str string) ([]byte, error)

func Start

func Start()

Types

type CountTime

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

type StStatistic

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

func CountSlc

func CountSlc(index int) *StStatistic

func (*StStatistic) Add

func (ss *StStatistic) Add(num int64)

func (*StStatistic) Begin

func (ss *StStatistic) Begin() func()

return endFunc

func (*StStatistic) End

func (ss *StStatistic) End(endFunc func())

func (*StStatistic) Init

func (ss *StStatistic) Init(name string, threshold time.Duration)

func (*StStatistic) Reset

func (ss *StStatistic) Reset()

func (*StStatistic) String

func (ss *StStatistic) String() string

Jump to

Keyboard shortcuts

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