Documentation ¶
Index ¶
- Constants
- type Agent
- func (a *Agent) DockerDefaults() conf.DockerDefaults
- func (a *Agent) Init()
- func (Agent) MarshalDefaults(v interface{})
- func (a *Agent) Publish(channel string, subject string, data []byte) (*constants.Task, error)
- func (a *Agent) Register(subject string, processor constants.TaskProcessor)
- func (a *Agent) RegisterRoutes(routes ...*courier.Route)
- func (a *Agent) SendTask(task *constants.Task) error
- func (a *Agent) Start(numWorker int)
- func (a *Agent) Stop()
- type Backend
- type Consumer
- type CronDescriber
- type Producer
- type Worker
Constants ¶
View Source
const ( DefaultCentralChannel = "service-task-manager.dev" DefaultCentralSubject = "CreateOrUpdateCronTable" DefaultFeedbackSubject = "TaskStatusFeedback" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agent ¶
type Agent struct { ConnectionInfo constants.ConnectionInfo Channel string BrokerType constants.BrokerType `conf:"env"` CentralChannel string `conf:"env"` CentralSubject string `conf:"env"` // contains filtered or unexported fields }
func (*Agent) DockerDefaults ¶
func (a *Agent) DockerDefaults() conf.DockerDefaults
func (Agent) MarshalDefaults ¶
func (Agent) MarshalDefaults(v interface{})
func (*Agent) Register ¶
func (a *Agent) Register(subject string, processor constants.TaskProcessor)
func (*Agent) RegisterRoutes ¶
type Consumer ¶
type Consumer interface { RegisterChannel(channel string, processor constants.TaskProcessor) error Work() Stop() }
type CronDescriber ¶
type CronDescriber interface {
CronSpec() string
}
type Worker ¶
type Worker struct {
// contains filtered or unexported fields
}
func NewWorker ¶
func NewWorker(brokerType constants.BrokerType, connInfo constants.ConnectionInfo) *Worker
Click to show internal directories.
Click to hide internal directories.