Documentation ¶
Index ¶
- func BuildLogFilename(logtype string, subname string) string
- func BuildLogSubFilename(appName string, version string) string
- func ClearLogs() error
- func Debug(message string, fields ...zap.Field)
- func Error(message string, fields ...zap.Field)
- func Fatal(message string, fields ...zap.Field)
- func Info(message string, fields ...zap.Field)
- func InitLogger(level zapcore.Level, isConsole bool, logpath string, nodeType string)
- func JSON(key string, obj interface{}) zap.Field
- func MD5Protobuf(pb proto.Message) (string, error)
- func SyncLogger()
- func Warn(message string, fields ...zap.Field)
- type L2BaseTask
- type L2RoutinePool
- type L2Task
- type RoutinePool
- type Task
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildLogFilename ¶ added in v0.7.192
BuildLogFilename -
func BuildLogSubFilename ¶ added in v0.7.192
BuildLogSubFilename -
func InitLogger ¶
InitLogger - initializes a thread-safe singleton logger
func MD5Protobuf ¶ added in v0.7.208
MD5Protobuf - md5 protobuf and return string
Types ¶
type L2BaseTask ¶ added in v0.7.130
type L2BaseTask struct {
// contains filtered or unexported fields
}
L2BaseTask - level 2 basetask
func (*L2BaseTask) GetParentID ¶ added in v0.7.130
func (task *L2BaseTask) GetParentID() string
GetParentID - get parentID
func (*L2BaseTask) GetTaskID ¶ added in v0.7.130
func (task *L2BaseTask) GetTaskID() int64
GetTaskID - get taskID
func (*L2BaseTask) Init ¶ added in v0.7.130
func (task *L2BaseTask) Init(pool L2RoutinePool, parentID string)
Init - init
type L2RoutinePool ¶ added in v0.7.130
type L2RoutinePool interface { // SendTask - send new task SendTask(task L2Task) // Start - start a routine pool Start(ctx context.Context, maxNums int) error // GetStatus - get status GetStatus() string // NewTaskID - new taskID NewTaskID() int64 // BuildStatus - build status BuildStatus() *jarviscorepb.L2PoolInfo }
L2RoutinePool - L2RoutinePool
func NewL2RoutinePool ¶ added in v0.7.130
func NewL2RoutinePool() L2RoutinePool
NewL2RoutinePool - new RoutinePool
type L2Task ¶ added in v0.7.130
type L2Task interface { // Run - run task Run(ctx context.Context) error // GetParentID - get parentID GetParentID() string // GetTaskID - get taskID GetTaskID() int64 }
L2Task - level 2 task
Click to show internal directories.
Click to hide internal directories.