xlib

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2018 License: LGPL-3.0, Apache-2.0 Imports: 15 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 BinRead

func BinRead(reader io.Reader, data interface{}) error

func BinWrite

func BinWrite(writer io.Writer, data interface{}) error

func CheckIPAddrSlc

func CheckIPAddrSlc(str string) bool

func CheckItfcNil

func CheckItfcNil(itfc interface{}) bool

func CheckNumber

func CheckNumber(str string) bool

func CopyFile

func CopyFile(dstName, srcName string) (written int64, err error)

func OnlyNumLetterUnderline

func OnlyNumLetterUnderline(str string) bool

func PathExists

func PathExists(path string) (bool, error)

func ReadByte

func ReadByte(r io.Reader) (byte, error)

func ReadBytes

func ReadBytes(reader io.Reader) ([]byte, error)

func ReadFileDataFromCmd

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

func ReadUint8

func ReadUint8(r io.Reader) (uint8, error)

func ReadVarint

func ReadVarint(r io.Reader) (int, error)

func Start

func Start()

func WriteBytes

func WriteBytes(writer io.Writer, bys []byte) error

func WriteVarint

func WriteVarint(w io.Writer, i int) error

Types

type CountTime

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

type Int64Slice

type Int64Slice []int64

func (Int64Slice) Len

func (p Int64Slice) Len() int

func (Int64Slice) Less

func (p Int64Slice) Less(i, j int) bool

func (Int64Slice) Sort

func (p Int64Slice) Sort()

func (Int64Slice) Swap

func (p Int64Slice) Swap(i, j int)

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

Directories

Path Synopsis
pb
Package iavl is a generated protocol buffer package.
Package iavl is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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