Documentation ¶
Index ¶
- Constants
- type ConfigurationConsumer
- type DialOptions
- type ExecHandler
- type Task
- type Worker
- func (w *Worker) Consume(a *astiamqp.AMQP, cs ...ConfigurationConsumer) (err error)
- func (w *Worker) Context() context.Context
- func (w *Worker) Dial(o DialOptions)
- func (w *Worker) Exec(name string, args ...string) (ExecHandler, error)
- func (w *Worker) HandleSignals()
- func (w *Worker) NewTask() *Task
- func (w *Worker) Serve(addr string, h http.Handler)
- func (w *Worker) Stop()
- func (w *Worker) Wait()
Constants ¶
View Source
const ( ExecHandlerStatusCrashed = "crashed" ExecHandlerStatusRunning = "running" ExecHandlerStatusStopped = "stopped" )
Statuses
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigurationConsumer ¶
type ConfigurationConsumer struct { AMQP astiamqp.ConfigurationConsumer WorkerCount int }
ConfigurationConsumer represents a consumer configuration
type DialOptions ¶ added in v1.1.0
type DialOptions struct { Addr string Client *astiws.Client Header http.Header OnDial func() error OnReadError func(err error) }
DialOptions represents dial options
type ExecHandler ¶
type ExecHandler interface { Status() string Stop() }
ExecHandler represents an object capable of handling the execution of a cmd
type Worker ¶
type Worker struct {
// contains filtered or unexported fields
}
Worker represents an object capable of blocking, handling signals and stopping
func (*Worker) Consume ¶
func (w *Worker) Consume(a *astiamqp.AMQP, cs ...ConfigurationConsumer) (err error)
Consume consumes AMQP events
Click to show internal directories.
Click to hide internal directories.