lib

package
v0.0.0-...-4d122b3 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2016 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckError

func CheckError(err error)

func FileExists

func FileExists(f string) bool

检查文件或目录是否存在

func GetBinPath

func GetBinPath() string

获取可执行文件的所在路径

func GetConnection

func GetConnection(addr string) (*net.TCPConn, error)

func GetFilelist

func GetFilelist(path string) (fileList []string)

func GetHostname

func GetHostname() string

func GetIp

func GetIp() string

func HandleQuitSignal

func HandleQuitSignal(f func())

func HandleSignal

func HandleSignal(f func(), sig ...os.Signal)

func IpToUint32

func IpToUint32(ip string) uint32

func ReadConfig

func ReadConfig(cfgFile string) map[string]map[string]string

func StringTrimLast

func StringTrimLast(s string) string

func Unzip

func Unzip(data []byte) []byte

Types

type GlobalList

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

func GlobalListInit

func GlobalListInit() (globalList *GlobalList)

func (*GlobalList) PushBack

func (gl *GlobalList) PushBack(v interface{})

func (*GlobalList) Remove

func (gl *GlobalList) Remove() (e *list.Element)

func (*GlobalList) Setup

func (gl *GlobalList) Setup()

type QuitFunc

type QuitFunc func() bool

type QuitList

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

func NewQuitList

func NewQuitList() *QuitList

func (*QuitList) Append

func (this *QuitList) Append(f QuitFunc) (lstLen int)

func (*QuitList) ExecQuit

func (this *QuitList) ExecQuit()

func (*QuitList) HandleQuitSignal

func (this *QuitList) HandleQuitSignal()

自带信号处理方法,需要在ExecQuit()执行前调用 也可用其他信号处理方法替代

type RotateWriter

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

func NewRotateWriter

func NewRotateWriter(outDir string) *RotateWriter

func (*RotateWriter) Write

func (this *RotateWriter) Write(p []byte) (n int, err error)

type WaitQuit

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

func NewWaitQuit

func NewWaitQuit(modName string, allow ...int) *WaitQuit

func (*WaitQuit) AllDone

func (this *WaitQuit) AllDone()

func (*WaitQuit) Quit

func (this *WaitQuit) Quit() bool

Jump to

Keyboard shortcuts

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