tasks

package
v0.0.0-...-8e399c3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 13, 2022 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Server        server.Server
	Client        server.Client
	Tasks         map[string]interface{}
	TasksCallback map[string]interface{}
)

Functions

func SendDelayTask

func SendDelayTask(taskName string, delay time.Duration, args ...interface{}) (string, error)

func SendRetryTask

func SendRetryTask(taskName string, retryCount int, args ...interface{}) (string, error)

func SendRunAtTask

func SendRunAtTask(taskName string, runAt time.Time, args ...interface{}) (string, error)

func SendTask

func SendTask(taskName string, args ...interface{}) (string, error)

func Setup

func Setup()

func StartTasksServer

func StartTasksServer()

func StopTasksServer

func StopTasksServer() error

Types

type MyLogger

type MyLogger struct {
	// contains filtered or unexported fields
}

func NewMyLogger

func NewMyLogger(logger *zap.Logger) *MyLogger

func (*MyLogger) Clone

func (ml *MyLogger) Clone() log.LoggerInterface

func (*MyLogger) Debug

func (ml *MyLogger) Debug(msg string)

func (*MyLogger) DebugWithField

func (ml *MyLogger) DebugWithField(msg string, key string, val interface{})

func (*MyLogger) Error

func (ml *MyLogger) Error(msg string)

func (*MyLogger) ErrorWithField

func (ml *MyLogger) ErrorWithField(msg string, key string, val interface{})

func (*MyLogger) Fatal

func (ml *MyLogger) Fatal(msg string)

func (*MyLogger) FatalWithField

func (ml *MyLogger) FatalWithField(msg string, key string, val interface{})

func (*MyLogger) Info

func (ml *MyLogger) Info(msg string)

func (*MyLogger) InfoWithField

func (ml *MyLogger) InfoWithField(msg string, key string, val interface{})

func (*MyLogger) Panic

func (ml *MyLogger) Panic(msg string)

func (*MyLogger) PanicWithField

func (ml *MyLogger) PanicWithField(msg string, key string, val interface{})

func (*MyLogger) SetLevel

func (ml *MyLogger) SetLevel(level string)

func (*MyLogger) Warn

func (ml *MyLogger) Warn(msg string)

func (*MyLogger) WarnWithField

func (ml *MyLogger) WarnWithField(msg string, key string, val interface{})

type MyRedisBackend

type MyRedisBackend struct {
}

func NewMyRedisBackend

func NewMyRedisBackend() *MyRedisBackend

func (*MyRedisBackend) Activate

func (br *MyRedisBackend) Activate()

func (*MyRedisBackend) Clone

func (*MyRedisBackend) GetPoolSize

func (br *MyRedisBackend) GetPoolSize() int

func (*MyRedisBackend) GetResult

func (br *MyRedisBackend) GetResult(key string) (message.Result, error)

func (*MyRedisBackend) SetPoolSize

func (br *MyRedisBackend) SetPoolSize(n int)

func (*MyRedisBackend) SetResult

func (br *MyRedisBackend) SetResult(result message.Result, exTime int) error

type MyRedisBroker

type MyRedisBroker struct {
	BLPopTimeout time.Duration
}

func NewMyRedisBroker

func NewMyRedisBroker(blPopTimeout time.Duration) *MyRedisBroker

func (*MyRedisBroker) Activate

func (mr *MyRedisBroker) Activate()

func (*MyRedisBroker) Clone

func (*MyRedisBroker) GetPoolSize

func (mr *MyRedisBroker) GetPoolSize() int

func (*MyRedisBroker) LSend

func (mr *MyRedisBroker) LSend(queueName string, msg message.Message) error

func (*MyRedisBroker) Next

func (mr *MyRedisBroker) Next(queueName string) (message.Message, error)

func (*MyRedisBroker) Send

func (mr *MyRedisBroker) Send(queueName string, msg message.Message) error

func (*MyRedisBroker) SetPoolSize

func (mr *MyRedisBroker) SetPoolSize(n int)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL