Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPTrigger ¶
type HTTPTrigger struct {
// contains filtered or unexported fields
}
func NewHTTPTrigger ¶
func NewHTTPTrigger(endpoint string, responseMimeType string) *HTTPTrigger
NewHTTPTrigger registers an endpoint to call Fn If Rn returns err, Trigger will respond with HTTP 400 Bad Request Trigger will send Fn return string as response
func (*HTTPTrigger) RunFunc ¶
func (t *HTTPTrigger) RunFunc(f RunFunc)
func (*HTTPTrigger) Start ¶
func (t *HTTPTrigger) Start()
func (*HTTPTrigger) Stop ¶
func (t *HTTPTrigger) Stop()
type SQSTrigger ¶
type SQSTrigger struct {
// contains filtered or unexported fields
}
func NewSQSTrigger ¶
func NewSQSTrigger(sqsClient *sqs.SQS, sqsURL string, sqsBatchSize int64) *SQSTrigger
NewSQSTrigger attaches to a SQS queue and executes Func for every message. If Func returns error != nil, message is not deleted after processing.
func (*SQSTrigger) RunFunc ¶
func (t *SQSTrigger) RunFunc(f RunFunc)
func (*SQSTrigger) Start ¶
func (t *SQSTrigger) Start()
func (*SQSTrigger) Stop ¶
func (t *SQSTrigger) Stop()
type TimerTrigger ¶
type TimerTrigger struct {
// contains filtered or unexported fields
}
func NewTimerTrigger ¶
func NewTimerTrigger(cronStr string) *TimerTrigger
NewTimerTrigger registers a new function to be executed at the specified time interface cron is a crontab style string, refer to https://godoc.org/github.com/robfig/cron
func (*TimerTrigger) RunFunc ¶
func (t *TimerTrigger) RunFunc(f RunFunc)
func (*TimerTrigger) Start ¶
func (t *TimerTrigger) Start()
func (*TimerTrigger) Stop ¶
func (t *TimerTrigger) Stop()
Click to show internal directories.
Click to hide internal directories.