Documentation ¶
Index ¶
- Variables
- func B32ToNum(s string) int64
- func B32ToString(n int64) string
- func BytesToStr(b []byte) string
- func CheckSingleProc()
- func ClearTx(tx *sql.Tx)
- func CopyFile(dstName, srcName string) (written int64, err error)
- func Float2String(v interface{}) map[string]interface{}
- func GBKToUTF8(src string) string
- func GZipCompress(data []byte) []byte
- func GZipUnCompress(data []byte) ([]byte, error)
- func GetProcName() string
- func GetStacks(args ...interface{}) string
- func Go(cb func())
- func HandlePanic()
- func HandleSignal(handler func(sig os.Signal))
- func Hash(str string) uint64
- func IsChineseName(str string) bool
- func IsEmail(str string) bool
- func IsMobilePhone(str string) bool
- func IsOnlyChinese(str string) bool
- func JsonAToB(a, b interface{}) error
- func MsgpackAToB(a, b interface{}) error
- func OnPanic(h func(string))
- func PathExist(path string) bool
- func ProcExist(name string) bool
- func RandBytes(n int) []byte
- func RandCodeString(n int) string
- func RandString(n int) string
- func Safe(cb func())
- func SetAnalyzerDebug(d bool)
- func SetErrorLinePrefix(prefix string)
- func SetMaxErrorStack(max int)
- func ShuffleBytes(b []byte) []byte
- func ShuffleString(s string) string
- func StrToBytes(s string) []byte
- func TestTimeID()
- func TimeID(n int) (string, error)
- func TrimComment(data []byte) []byte
- func TrimJson(data []byte, args ...interface{}) ([]byte, error)
- func TrimJsonComma(data []byte, args ...interface{}) ([]byte, error)
- func UTF8ToGBK(src string) string
- func ZlibCompress(data []byte) []byte
- func ZlibUnCompress(data []byte) ([]byte, error)
- type Analyzer
- type ConfigLoader
- type Empty
- type Error
- type LinkTask
- type Qps
- type TimeCOunt
- type WorkerPool
- type WorkerPoolLink
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrWorkerPoolTimeout = errors.New("timeout") ErrWorkerPoolStopped = errors.New("worker pool has stopped") )
View Source
var ( MAX_ERROR_STACK = 128 ERROR_LINE_PREFIX = "\n\t" )
Functions ¶
func B32ToString ¶
func BytesToStr ¶
func CheckSingleProc ¶
func CheckSingleProc()
func Float2String ¶
func Float2String(v interface{}) map[string]interface{}
func GZipCompress ¶
func GZipUnCompress ¶
func GetProcName ¶
func GetProcName() string
func HandlePanic ¶
func HandlePanic()
func HandleSignal ¶
func IsChineseName ¶
func IsMobilePhone ¶
func IsOnlyChinese ¶
func RandCodeString ¶
func RandString ¶
func SetAnalyzerDebug ¶
func SetAnalyzerDebug(d bool)
func SetErrorLinePrefix ¶
func SetErrorLinePrefix(prefix string)
func SetMaxErrorStack ¶
func SetMaxErrorStack(max int)
func ShuffleBytes ¶
func ShuffleString ¶
func StrToBytes ¶
func TestTimeID ¶
func TestTimeID()
func TrimComment ¶
func TrimJsonComma ¶
func ZlibCompress ¶
func ZlibUnCompress ¶
Types ¶
type Analyzer ¶
type ConfigLoader ¶
func NewConfigLoader ¶
type Qps ¶
type TimeCOunt ¶
type TimeCOunt struct { Tag string B time.Time E time.Time // contains filtered or unexported fields }
func NewTimeCount ¶
type WorkerPool ¶
func NewWorkerPool ¶
func NewWorkerPool(tag string, qCap int, corNum int) *WorkerPool
func (*WorkerPool) Stop ¶
func (c *WorkerPool) Stop()
type WorkerPoolLink ¶
type WorkerPoolLink struct { sync.RWMutex sync.WaitGroup // contains filtered or unexported fields }
func NewWorkerPoolLink ¶
func NewWorkerPoolLink(tag string, qCap int, corNum int) *WorkerPoolLink
func (*WorkerPoolLink) Go ¶
func (c *WorkerPoolLink) Go(h func(task *LinkTask)) error
func (*WorkerPoolLink) Stop ¶
func (c *WorkerPoolLink) Stop()
Click to show internal directories.
Click to hide internal directories.