Documentation ¶
Index ¶
- Constants
- Variables
- func BufToMsg(buf []byte) (*Json, error)
- func ConnectRedis(host string, port int, db int64) error
- func Debug(format string, v ...interface{})
- func Error(format string, v ...interface{})
- func Fatal(format string, v ...interface{})
- func GetLevel() int
- func Info(format string, v ...interface{})
- func InitLogger(logFileName string)
- func JsonToStruct(js *Json, u interface{})
- func LoadConfig(filename string)
- func LoadFromRedis(client *redis.Client, info interface{}) error
- func MsgToBuf(msg interface{}) ([]byte, error)
- func PopRedisClient() *redis.Client
- func PushRedisClient(client *redis.Client)
- func SaveToRedis(client *redis.Client, info interface{})
- func SetIsOutputScreen(isOutput bool)
- func SetLevel(l int)
- func StructName(s interface{}) string
- func Trace(format string, v ...interface{})
- func Warn(format string, v ...interface{})
- type Counter
Constants ¶
View Source
const ( TraceLevel = iota DebugLevel WarnLevel ErrorLevel InfoLevel FatalLevel )
Variables ¶
View Source
var Config *Json
Functions ¶
func InitLogger ¶
func InitLogger(logFileName string)
func JsonToStruct ¶
func JsonToStruct(js *Json, u interface{})
func LoadConfig ¶
func LoadConfig(filename string)
func LoadFromRedis ¶
func LoadFromRedis(client *redis.Client, info interface{}) error
func PopRedisClient ¶
func PopRedisClient() *redis.Client
func PushRedisClient ¶
func PushRedisClient(client *redis.Client)
func SaveToRedis ¶
func SaveToRedis(client *redis.Client, info interface{})
func SetIsOutputScreen ¶
func SetIsOutputScreen(isOutput bool)
func StructName ¶
func StructName(s interface{}) string
Types ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.