Documentation ¶
Overview ¶
Sources are are where events are placed or called from. They can listen on a specific http port, watch an AWS SQS queue etc
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Base ¶
type Base struct { config.Source Listener *listener.Listener Log logger.Logger // contains filtered or unexported fields }
Helper struct that performs common functions that most if not all Sources will use
type Beanstalkd ¶
type Beanstalkd struct {
Base
}
Listens to an AWS SQS. When a message is placed onto this queue it is converted into a Event and assessed by the listeners. The message must be a JSON string representing an Event
func (*Beanstalkd) Listen ¶
func (this *Beanstalkd) Listen(wg sync.WaitGroup)
Satisfies the Source interface. Begins listening to an AWS SQS queue. If no message is on the queue it sleeps for a set period of time before trying again
type Http ¶
type Http struct {
Base
}
Http source listens to a specified http port. To create an event send a "POST" request to "/event/" with the json event object as the body of the request.
curl -X POST -d '{"event":"test","message":{"test": 1}' http://localhost:8080/event/