Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Broker ¶
type Broker struct {
// contains filtered or unexported fields
}
Broker run jobs using Broker service.
func (*Broker) Listen ¶
func (b *Broker) Listen(pipelines []*jobs.Pipeline, pool chan jobs.Handler, err jobs.ErrorHandler) error
Listen configures broker with list of tubes to listen and handler function. Local broker groups all tubes together.
type Config ¶
type Config struct { // Region defined SQS region, not required when endpoint is not empty. Region string // Region defined AWS API key, not required when endpoint is not empty. Key string // Region defined AWS API secret, not required when endpoint is not empty. Secret string // Endpoint can be used to re-define SQS endpoint to custom location. Only for local development. Endpoint string }
Config defines sqs broker configuration.
type Queue ¶
type Queue struct { // Indicates that tube must be listened. Listen bool // Queue is queue name. Queue string // URL is queue url. URL *string // Create indicates that queue must be automatically created. Create bool // Attributes defines set of options to be used to create queue. Attributes map[interface{}]interface{} // Reserve - The duration (in seconds) that the received messages are hidden from subsequent. Default 600. Timeout int // WaitTime defines the number of seconds queue waits for job to arrive. Default 1. WaitTime int }
Queue defines single SQS queue.
func (*Queue) CreateAttributes ¶
CreateAttributes must return queue create attributes.
Click to show internal directories.
Click to hide internal directories.