handler

package
v0.0.0-...-a74b2ab Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 15, 2015 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Overview

handler describes all of the systems that events can be sent to by eevy

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Beanstalkd

type Beanstalkd struct {
	HandlerBase

	Config config.Beanstalkd
}

Places a message on an AWS SQS when relevant event is triggered

func (*Beanstalkd) Exec

func (this *Beanstalkd) Exec(evt event.Event)

Satisfies the Listener interface and places the event on an AWS SQS

func (*Beanstalkd) GetConfig

func (this *Beanstalkd) GetConfig() config.Handler

func (*Beanstalkd) GetType

func (this *Beanstalkd) GetType() string

type Cli

type Cli struct {
	HandlerBase

	Config config.Cli
}

This listener performs system calls. Perhaps a local binary needs to be called, use this listener.

func (*Cli) Exec

func (this *Cli) Exec(evt event.Event)

Satisfies the Listener interface and calls the relevant binary file

func (*Cli) GetConfig

func (this *Cli) GetConfig() config.Handler

func (*Cli) GetType

func (this *Cli) GetType() string

type Handler

type Handler interface {
	Exec(evt event.Event)
	GetType() string
	GetName() string
	SetName(s string)
	GetConfig() config.Handler
}

func BuildHandlerFromConf

func BuildHandlerFromConf(conf config.Handler, log logger.Logger) *Handler

Receives a configuration struct and creates the relevant Handler

type HandlerBase

type HandlerBase struct {
	Log  logger.Logger
	Name string
}

func (*HandlerBase) GetName

func (this *HandlerBase) GetName() string

func (*HandlerBase) SetName

func (this *HandlerBase) SetName(s string)

type HandlerList

type HandlerList struct {
	List map[string]Handler
}

func BuildFromConf

func BuildFromConf(conf appConfig.HandlerList, log logger.Logger) *HandlerList

func (*HandlerList) Get

func (this *HandlerList) Get(s string) Handler

type Lambda

type Lambda struct {
	HandlerBase

	Config config.Lambda
}

Executes an AWS Lambda function when relevant event triggered

func (*Lambda) Exec

func (this *Lambda) Exec(evt event.Event)

Satisfies the Listener interface and calls the Lambda function

func (*Lambda) GetConfig

func (this *Lambda) GetConfig() config.Handler

func (*Lambda) GetType

func (this *Lambda) GetType() string

type OAuth2

type OAuth2 struct {
	HandlerBase

	Config config.OAuth2
}

Make an http call authenticating via an OAuth2 url

func (*OAuth2) Exec

func (this *OAuth2) Exec(evt event.Event)

Satisfies the Listener interface and makes the http call after authenticating

func (*OAuth2) GetConfig

func (this *OAuth2) GetConfig() config.Handler

func (*OAuth2) GetType

func (this *OAuth2) GetType() string

type Sqs

type Sqs struct {
	HandlerBase

	Config config.Sqs
}

Places a message on an AWS SQS when relevant event is triggered

func (*Sqs) Exec

func (this *Sqs) Exec(evt event.Event)

Satisfies the Listener interface and places the event on an AWS SQS

func (*Sqs) GetConfig

func (this *Sqs) GetConfig() config.Handler

func (*Sqs) GetType

func (this *Sqs) GetType() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL