Documentation ¶
Index ¶
- Constants
- Variables
- func ChangeLogLevel(level string)
- func GenerateExtendedTsidNumber(options ...bool) string
- func GenerateRequestID() sno.ID
- func GenerateRequestIDByte() []byte
- func GenerateRequestIDString() string
- func GenerateTsidBytes(options ...bool) []byte
- func GenerateTsidNumber() int64
- func GenerateTsidString(options ...bool) string
- func GetEpoch() int64
- func GetIDMeta() byte
- func GetNodeBits() int32
- func GetNodeId() int32
- func GetPrefix() string
- func GetSuffix() string
- func InitWithConfig(config *UidConfig)
- func InitializeLogger(maxSize int, maxBackups int, maxAge int, compress bool, logBaseDir string)
- func IsEmptyJson(data interface{}) bool
- func SetEpoch(b int64)
- func SetIDMeta(b byte)
- func SetNodeBits(b int32)
- func SetNodeId(b int32)
- func SetPrefix(s string)
- func SetSuffix(s string)
- type UidConfig
Constants ¶
View Source
const ( MSG_CREATE_FACTORY_ERROR = "Error fetching customized TsidFactory, fallback to default" MSG_TSID_GENERATE_ERROR = "Error generating tsid, fallback to default generator" )
Variables ¶
View Source
var AppZapConfig zapcore.EncoderConfig
View Source
var AppZapConsoleEncoder zapcore.Encoder
View Source
var AppZapCore zapcore.Core
View Source
var AppZapFileEncoder zapcore.Encoder
View Source
var AppZapWriter zapcore.WriteSyncer
View Source
var Logger *zap.Logger
View Source
var SLogger *zap.SugaredLogger
View Source
var ZapLevel zapcore.Level
Functions ¶
func ChangeLogLevel ¶
func ChangeLogLevel(level string)
func GenerateExtendedTsidNumber ¶ added in v1.2.0
func GenerateRequestID ¶
func GenerateRequestIDByte ¶
func GenerateRequestIDByte() []byte
func GenerateRequestIDString ¶
func GenerateRequestIDString() string
func GenerateTsidBytes ¶ added in v1.2.0
func GenerateTsidNumber ¶ added in v1.2.0
func GenerateTsidNumber() int64
func GenerateTsidString ¶ added in v1.2.0
*
- GenerateTsidString
- @params options - [usePrefix, useSuffix]
func GetNodeBits ¶ added in v1.2.0
func GetNodeBits() int32
func InitWithConfig ¶ added in v1.2.0
func InitWithConfig(config *UidConfig)
func InitializeLogger ¶
func IsEmptyJson ¶ added in v1.1.0
func IsEmptyJson(data interface{}) bool
func SetNodeBits ¶ added in v1.2.0
func SetNodeBits(b int32)
Types ¶
Click to show internal directories.
Click to hide internal directories.