Documentation
¶
Index ¶
- Constants
- func GetDaySlot(t time.Time) int64
- func GetRandString(n int) string
- func GetSlots(t time.Time) (int64, int, int)
- func Hash64(s []byte) uint64
- func HashKeysUint32(iData map[uint32]struct{}) (uint64, []uint32)
- func HashMapUint32(iData map[uint32]uint32) (uint64, []uint32)
- func HashSliceUint32(keys []uint32) (uint64, []uint32)
- func HashUint32(v ...uint32) uint64
- func Random(min, max int) int
- func Range(v uint64) int
- type ILoggerHandler
- type Logger
- type LoggerNil
- func (l *LoggerNil) Fatal(v ...interface{})
- func (l *LoggerNil) Fatalf(format string, v ...interface{})
- func (l *LoggerNil) Fatalln(v ...interface{})
- func (l *LoggerNil) Flags() int
- func (l *LoggerNil) Output(calldepth int, s string) error
- func (l *LoggerNil) Panic(v ...interface{})
- func (l *LoggerNil) Panicf(format string, v ...interface{})
- func (l *LoggerNil) Panicln(v ...interface{})
- func (l *LoggerNil) Prefix() string
- func (l *LoggerNil) Print(v ...interface{})
- func (l *LoggerNil) Printf(format string, v ...interface{})
- func (l *LoggerNil) Println(v ...interface{})
- func (l *LoggerNil) SetFlags(flag int)
- func (l *LoggerNil) SetOutput(w io.Writer)
- func (l *LoggerNil) SetPrefix(prefix string)
- type Uint32Slice
Constants ¶
View Source
const ( Debug = "debug" Info = "info" Warning = "warning" Error = "error" Nil = "nil" )
View Source
const (
DaySeconds = 24 * 60 * 60
)
Variables ¶
This section is empty.
Functions ¶
func GetDaySlot ¶
func GetRandString ¶
func HashKeysUint32 ¶
func HashSliceUint32 ¶
func HashUint32 ¶
Types ¶
type ILoggerHandler ¶
type ILoggerHandler interface {
SetOutput(w io.Writer)
Output(calldepth int, s string) error
Printf(format string, v ...interface{})
Print(v ...interface{})
Println(v ...interface{})
Fatal(v ...interface{})
Fatalf(format string, v ...interface{})
Fatalln(v ...interface{})
Panic(v ...interface{})
Panicf(format string, v ...interface{})
Panicln(v ...interface{})
Flags() int
SetFlags(flag int)
Prefix() string
SetPrefix(prefix string)
}
type Logger ¶
type Logger struct {
Debug ILoggerHandler
Info ILoggerHandler
Warning ILoggerHandler
Error ILoggerHandler
Any ILoggerHandler
}
type LoggerNil ¶
type LoggerNil struct {
}
func NewLoggerNil ¶
func NewLoggerNil() *LoggerNil
type Uint32Slice ¶
type Uint32Slice []uint32
func (Uint32Slice) Len ¶
func (p Uint32Slice) Len() int
func (Uint32Slice) Less ¶
func (p Uint32Slice) Less(i, j int) bool
func (Uint32Slice) Swap ¶
func (p Uint32Slice) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.