Documentation ¶
Index ¶
- func Alloc(size int) []byte
- func AllocMemory() int64
- func Clock() time.Duration
- func CopyFile(dst, src string) error
- func Exists(path string) bool
- func Free(b []byte)
- func GetFileInode(path string) (uint64, error)
- func GetLogger(name string) *logHandle
- func GetStdLogger(l *logHandle, lvl logrus.Level) *glog.Logger
- func InitLoggers(logToSyslog bool)
- func MemoryUsage() (virt, rss uint64)
- func Min(a, b int) int
- func NewDynProgressBar(title string, quiet bool) (*mpb.Progress, *mpb.Bar)
- func NewProgressCounter(title string) (*mpb.Progress, *mpb.Bar)
- func NewSpinner() mpb.BarFiller
- func Now() time.Time
- func SetLogLevel(lvl logrus.Level)
- func SetOutFile(name string)
- func SplitDir(d string) []string
- type Buffer
- func (b *Buffer) Buffer() []byte
- func (b *Buffer) Bytes() []byte
- func (b *Buffer) Get(l int) []byte
- func (b *Buffer) Get16() uint16
- func (b *Buffer) Get32() uint32
- func (b *Buffer) Get64() uint64
- func (b *Buffer) Get8() uint8
- func (b *Buffer) HasMore() bool
- func (b *Buffer) Left() int
- func (b *Buffer) Len() int
- func (b *Buffer) Put(v []byte)
- func (b *Buffer) Put16(v uint16)
- func (b *Buffer) Put32(v uint32)
- func (b *Buffer) Put64(v uint64)
- func (b *Buffer) Put8(v uint8)
- func (b *Buffer) Seek(p int)
- func (b *Buffer) SetBytes(buf []byte)
- type Cond
- type Rusage
- type SyslogHook
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetFileInode ¶
func GetStdLogger ¶ added in v0.9.0
GetStdLogger returns standard golang logger
func InitLoggers ¶
func InitLoggers(logToSyslog bool)
func MemoryUsage ¶
func MemoryUsage() (virt, rss uint64)
func NewDynProgressBar ¶ added in v0.16.1
NewDynProgressBar init a dynamic progress bar,the title will appears at the head of the progress bar
func NewProgressCounter ¶ added in v0.16.1
func NewProgressCounter(title string) (*mpb.Progress, *mpb.Bar)
NewProgressCounter init a progress counter
func NewSpinner ¶ added in v0.16.1
func NewSpinner() mpb.BarFiller
func SetLogLevel ¶
SetLogLevel sets Level to all the loggers in the map
func SetOutFile ¶
func SetOutFile(name string)
Types ¶
type Buffer ¶
type Buffer struct {
// contains filtered or unexported fields
}
Buffer is a buffer to read/write integers.
func NewNativeBuffer ¶
NewNativeBuffer utility to create *Buffer of given size with nativeEndian
func ReadBuffer ¶
ReadBuffer utility to create *Buffer from slice of bytes
type Cond ¶
Cond is similar to sync.Cond, but you can wait without a timeout.
type SyslogHook ¶
type SyslogHook struct {
*logrus_syslog.SyslogHook
}
Click to show internal directories.
Click to hide internal directories.