Documentation ¶
Index ¶
- Variables
- func CreatePath(filePath string) error
- func GetRand(start int, end int) int
- func GetStackInfo(skip int) (string, int)
- func GetStackInfoString(skip int) string
- func HttpGet(url string, retMap interface{}) error
- func HttpPost(url, params string, contentType string, retMap interface{}) error
- func IsExist(path string) bool
- func Logger() *zap.SugaredLogger
- func MaxInt(a int, b int) int
- func MaxInt64(a int64, b int64) int64
- func MinInt(a int, b int) int
- func MinInt64(a int64, b int64) int64
- func ReadFile(filePth string) ([]byte, error)
- func StartPporfService(ipstr string)
- func StripFileName(filename string, part int) string
- func Unwrap(num int64, retain int) float64
- func UnwrapToInt64(num int64, retain int) int64
- func Wrap(num float64, retain int) int64
- func WrapToFloat64(num float64, retain int) float64
- func WriteFile(path string, data []byte) error
- type ILinerHandle
- type LinerDispatch
- type PacketList
- type TimerItem
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Timer_LoopForever int = -1 //无效定时器 Timer_Stop int = 0 //定时器运行一次 )
Functions ¶
func CreatePath ¶
func GetStackInfoString ¶
func Logger ¶
func Logger() *zap.SugaredLogger
func StartPporfService ¶
func StartPporfService(ipstr string)
func StripFileName ¶
将绝对路径按需要的节从右压缩 例如: /server/src/core/util/stack.go中 当cStripPathSection=3 返回 core/util/stack.go
Types ¶
type ILinerHandle ¶
type ILinerHandle interface {
OnLinerEvent(interface{})
}
type LinerDispatch ¶
type LinerDispatch struct {
// contains filtered or unexported fields
}
func NewLinerDispatch ¶
func NewLinerDispatch() *LinerDispatch
func (*LinerDispatch) Add ¶
func (ld *LinerDispatch) Add(pkt interface{})
func (*LinerDispatch) Init ¶
func (ld *LinerDispatch) Init()
func (*LinerDispatch) RegiserCallBack ¶
func (ld *LinerDispatch) RegiserCallBack(fc func(interface{}))
func (*LinerDispatch) Start ¶
func (ld *LinerDispatch) Start()
func (*LinerDispatch) Stop ¶
func (ld *LinerDispatch) Stop()
type PacketList ¶
type PacketList struct {
// contains filtered or unexported fields
}
func NewPacketList ¶
func NewPacketList() *PacketList
func (*PacketList) Add ¶
func (pl *PacketList) Add(p interface{})
func (*PacketList) BeginPick ¶
func (pl *PacketList) BeginPick() []interface{}
func (*PacketList) Close ¶
func (pl *PacketList) Close()
func (*PacketList) EndPick ¶
func (pl *PacketList) EndPick()
func (*PacketList) Len ¶
func (pl *PacketList) Len() int
func (*PacketList) Reset ¶
func (pl *PacketList) Reset()
Click to show internal directories.
Click to hide internal directories.