Documentation ¶
Index ¶
- func FailOnError(logger *utils.Logger, err error)
- type App
- type ChannelInterface
- type ChannelRabbitMq
- type ChannelRedis
- type Job
- type Scheduler
- type SchedulerGoCron
- func (s *SchedulerGoCron) Add(args ...interface{})
- func (s *SchedulerGoCron) Delete(args ...interface{})
- func (s *SchedulerGoCron) Down()
- func (s *SchedulerGoCron) List()
- func (s *SchedulerGoCron) Run()
- func (s *SchedulerGoCron) Start()
- func (s *SchedulerGoCron) Stop()
- func (s *SchedulerGoCron) Up()
- func (s *SchedulerGoCron) Update(args ...interface{})
- type SchedulerInterface
- type SchedulerJob
- type SchedulerJobRunner
- func (s *SchedulerJobRunner) Add(args ...interface{})
- func (s *SchedulerJobRunner) Delete(args ...interface{})
- func (s *SchedulerJobRunner) Down()
- func (s *SchedulerJobRunner) List()
- func (s *SchedulerJobRunner) Run()
- func (s *SchedulerJobRunner) Start()
- func (s *SchedulerJobRunner) Stop()
- func (s *SchedulerJobRunner) Up()
- func (s *SchedulerJobRunner) Update(args ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FailOnError ¶
FailOnError panic error with logger
Types ¶
type App ¶
type App struct { Database *database.Database Channel chan os.Signal Config *model.Config Logger *utils.Logger ChannelRabbitMq *ChannelRabbitMq ChannelRedis *ChannelRedis Scheduler *Scheduler Mode model.MODE Job *Job Node *model2.Node }
App structure
type ChannelInterface ¶
type ChannelInterface interface { Start() Subscribe() Receive() }
ChannelInterface queuing structure interface
type ChannelRabbitMq ¶
type ChannelRabbitMq struct { ChannelInterface App *App Conn *amqp.Connection Channel *amqp.Channel }
ChannelRabbitMq queuing structure
func NewRabbitMq ¶
func NewRabbitMq(app *App) *ChannelRabbitMq
NewRabbitMq building rabbitMQ queuing
func (*ChannelRabbitMq) Receive ¶
func (r *ChannelRabbitMq) Receive()
Receive consume rabbitMQ channel
func (*ChannelRabbitMq) Subscribe ¶
func (r *ChannelRabbitMq) Subscribe()
Subscribe rabbitMQ channel
type ChannelRedis ¶
type ChannelRedis struct { ChannelInterface App *App Client *redis.Client PubSub *redis.PubSub }
ChannelRedis queuing structure
type Scheduler ¶
type Scheduler struct { App *App Package SchedulerInterface }
Scheduler application job scheduler
type SchedulerGoCron ¶
type SchedulerGoCron struct { SchedulerInterface `json:"-"` *Scheduler GoCron *gocron.Scheduler Jobs []Job }
SchedulerGoCron gocron package adapter
func (*SchedulerGoCron) Delete ¶
func (s *SchedulerGoCron) Delete(args ...interface{})
Delete gocron job
func (*SchedulerGoCron) Update ¶
func (s *SchedulerGoCron) Update(args ...interface{})
Update gocron job
type SchedulerInterface ¶
type SchedulerInterface interface { Up() Down() Start() List() Add(args ...interface{}) Update(args ...interface{}) Delete(args ...interface{}) Run() Stop() }
SchedulerInterface application job scheduler interface
type SchedulerJob ¶
type SchedulerJob struct {
Data interface{} `json:"data"`
}
SchedulerJob General scheduler job struct
type SchedulerJobRunner ¶
type SchedulerJobRunner struct { SchedulerInterface `json:"-"` *Scheduler }
SchedulerJobRunner jobrunner package adapter
func (*SchedulerJobRunner) Add ¶
func (s *SchedulerJobRunner) Add(args ...interface{})
Add jobrunner job
func (*SchedulerJobRunner) Delete ¶
func (s *SchedulerJobRunner) Delete(args ...interface{})
Delete jobrunner job
func (*SchedulerJobRunner) Update ¶
func (s *SchedulerJobRunner) Update(args ...interface{})
Update jobrunner job
Click to show internal directories.
Click to hide internal directories.