Documentation ¶
Overview ¶
轻量级单对象并行运行池 会产生一定的数据COPY version 1.0 beta by koangel email: jackliu100@gmail.com 2017/12/18
部分位置用于取代CHAN的无限无阻塞队列 version 1.0 beta 需要特别的LOCKFREE队列 ,尝试 github.com/yireyun/go-queue by koangel email: jackliu100@gmail.com 2018/04/13
Index ¶
- func Crc32IEEE(data []byte) uint32
- func Crc64ECMA(data []byte) uint64
- func Crc64ISO(data []byte) uint64
- func FastGZipMsg(src []byte, isBase64 bool) (data []byte, err error)
- func FastUnGZipMsg(src []byte, isBase64 bool) (data []byte, err error)
- func HMac_MD5(data, key []byte) string
- func HMac_MD5Bytes(data, key []byte) []byte
- func HMac_SHA1(data, key []byte) string
- func HMac_SHA1Bytes(data, key []byte) []byte
- func HMac_SHA256(data, key []byte) string
- func HMac_SHA256Bytes(data, key []byte) []byte
- func HMac_SHA512(data, key []byte) string
- func HMac_SHA512Bytes(data, key []byte) []byte
- func If(cond bool, a interface{}, b interface{}) interface{}
- func Ifd(cond bool, a float64, b float64) float64
- func Ifn(cond bool, a int, b int) int
- func Ifn32(cond bool, a int32, b int32) int32
- func Ifn64(cond bool, a int, b int64) int64
- func Ifs(cond bool, a string, b string) string
- func Ifun32(cond bool, a uint32, b uint32) uint32
- func Ifun64(cond bool, a uint64, b uint64) uint64
- func MD5(data []byte) string
- func MD5Bytes(data []byte) []byte
- func MergeBinary(src ...[]byte) []byte
- func MustBool(v interface{}, must bool) bool
- func MustFloat64(v interface{}, must float64) float64
- func MustInt(v interface{}, must int) int
- func MustInt64(v interface{}, must int64) int64
- func MustString(v interface{}) string
- func MustUInt64(v interface{}, must uint64) uint64
- func PanicTrace(kb int) []byte
- func RunDaemon(name string, desc string, sWork string, handler DaemonHandler) error
- func SHA1(data []byte) string
- func SHA1Bytes(data []byte) []byte
- func SHA256(data []byte) string
- func SHA256Bytes(data []byte) []byte
- func SHA512(data []byte) string
- func SHA512Bytes(data []byte) []byte
- func SplitBinary(src []byte) [][]byte
- type AVGLimit
- type DaemonHandler
- type LimitContiner
- func (l *LimitContiner) Add(val interface{})
- func (l *LimitContiner) Back() (value interface{}, ok bool)
- func (l *LimitContiner) Clear()
- func (l *LimitContiner) Foreach(fn func(n interface{}))
- func (l *LimitContiner) Front() (value interface{}, ok bool)
- func (l *LimitContiner) Len() int
- func (l *LimitContiner) MatchLimit(fn func(n interface{}) bool, limit int) bool
- func (l *LimitContiner) Search(fn func(n interface{}) bool) bool
- type StringLimit
- func (l *StringLimit) LineMatch(limit int) bool
- func (l *StringLimit) LineNSuffix(limit int) bool
- func (l *StringLimit) Match(val string, limit int) bool
- func (l *StringLimit) MatchPrefix(src string, limit int) bool
- func (l *StringLimit) Push(v string)
- func (l *StringLimit) Search(val string) bool
- func (l *StringLimit) Strings() []string
- type SyncJob
- type SyncQueue
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FastGZipMsg ¶
快速压缩一个数据内存 不支持大数据,不要用来压缩较大文件
func FastUnGZipMsg ¶
快速解压一个消息 不支持大数据,不要用来解压缩较大文件
func HMac_MD5Bytes ¶
func HMac_SHA1Bytes ¶
func HMac_SHA256 ¶
func HMac_SHA256Bytes ¶
func HMac_SHA512 ¶
func HMac_SHA512Bytes ¶
func If ¶
func If(cond bool, a interface{}, b interface{}) interface{}
当cond为true 返回a 否则返回b 支持a,b为任意不同的类型
func MergeBinary ¶
func MustFloat64 ¶
func MustString ¶
func MustString(v interface{}) string
func MustUInt64 ¶
func PanicTrace ¶
func RunDaemon ¶
func RunDaemon(name string, desc string, sWork string, handler DaemonHandler) error
func SHA256Bytes ¶
func SHA512Bytes ¶
Types ¶
type DaemonHandler ¶
type LimitContiner ¶
type LimitContiner struct {
// contains filtered or unexported fields
}
统计类的LIMIT库,限制数量 多线程同步的限制数量
func NewLC ¶
func NewLC(lc int) *LimitContiner
func (*LimitContiner) Add ¶
func (l *LimitContiner) Add(val interface{})
func (*LimitContiner) Back ¶
func (l *LimitContiner) Back() (value interface{}, ok bool)
func (*LimitContiner) Clear ¶
func (l *LimitContiner) Clear()
func (*LimitContiner) Foreach ¶
func (l *LimitContiner) Foreach(fn func(n interface{}))
func (*LimitContiner) Front ¶
func (l *LimitContiner) Front() (value interface{}, ok bool)
func (*LimitContiner) Len ¶
func (l *LimitContiner) Len() int
func (*LimitContiner) MatchLimit ¶
func (l *LimitContiner) MatchLimit(fn func(n interface{}) bool, limit int) bool
func (*LimitContiner) Search ¶
func (l *LimitContiner) Search(fn func(n interface{}) bool) bool
type StringLimit ¶
type StringLimit struct {
// contains filtered or unexported fields
}
func NewSL ¶
func NewSL(ls int) *StringLimit
func (*StringLimit) LineMatch ¶
func (l *StringLimit) LineMatch(limit int) bool
func (*StringLimit) LineNSuffix ¶
func (l *StringLimit) LineNSuffix(limit int) bool
func (*StringLimit) MatchPrefix ¶
func (l *StringLimit) MatchPrefix(src string, limit int) bool
func (*StringLimit) Push ¶
func (l *StringLimit) Push(v string)
func (*StringLimit) Search ¶
func (l *StringLimit) Search(val string) bool
func (*StringLimit) Strings ¶
func (l *StringLimit) Strings() []string
Click to show internal directories.
Click to hide internal directories.