Documentation ¶
Index ¶
- Variables
- func MarshalData(v interface{}) ([]byte, error)
- func SubjectAndDataFromValue(v interface{}) (string, []byte, error)
- func UnmarshalData(data []byte, v interface{}) error
- type Agent
- func (agent *Agent) Cancel(id string) error
- func (agent *Agent) Defer(subject string, nextTime time.Time, args interface{}) (*mq.Task, error)
- func (Agent) DockerDefaults() conf.DockerDefaults
- func (agent *Agent) GetPool() *redis.Pool
- func (agent *Agent) Init()
- func (agent *Agent) ListChannel() ([]string, error)
- func (agent *Agent) ListSubject(channel string) ([]string, error)
- func (Agent) MarshalDefaults(v interface{})
- func (agent *Agent) Next(subject string, args interface{}) (*mq.Task, error)
- func (agent *Agent) Publish(chanel, subject string, data []byte) (*mq.Task, error)
- func (agent *Agent) Register(subject string, job mq.Job)
- func (agent *Agent) RegisterCron(subject string, spec string) error
- func (agent *Agent) RegisterReceiver(receiver func(status *mq.TaskStatus) error)
- func (agent *Agent) RegisterRoutes(routes ...*courier.Route)
- func (agent *Agent) SendTask(task *mq.Task) error
- func (agent *Agent) StartReceiver()
- func (agent *Agent) StartWorker()
- type CronTableInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var (
InvalidDeferTaskTime = errors.New("延迟执行任务时间错误")
)
Functions ¶
func MarshalData ¶
func SubjectAndDataFromValue ¶
func UnmarshalData ¶
Types ¶
type Agent ¶
type Agent struct { Name string CentreChannel string `conf:"env"` Protocol string Host string `conf:"env,upstream"` Port int32 `conf:"env"` Password presets.Password `conf:"env"` ConnectTimeout time.Duration ReadTimeout time.Duration WriteTimeout time.Duration IdleTimeout time.Duration MaxActive int MaxIdle int Wait bool DB int NumWorkers int `conf:"env"` Prefix string // contains filtered or unexported fields }
func (Agent) DockerDefaults ¶
func (Agent) DockerDefaults() conf.DockerDefaults
func (*Agent) ListChannel ¶
func (Agent) MarshalDefaults ¶
func (Agent) MarshalDefaults(v interface{})
func (*Agent) RegisterReceiver ¶
func (agent *Agent) RegisterReceiver(receiver func(status *mq.TaskStatus) error)
func (*Agent) RegisterRoutes ¶
func (*Agent) StartReceiver ¶
func (agent *Agent) StartReceiver()
func (*Agent) StartWorker ¶
func (agent *Agent) StartWorker()
type CronTableInfo ¶
Click to show internal directories.
Click to hide internal directories.