cfha/engine/handler.go

17 lines
306 B
Go
Raw Permalink Normal View History

2015-08-23 03:20:58 +00:00
package engine
import (
"../core"
"../handlers"
)
func createHandler(handler core.ReactionConfig) *core.GenericHandler {
switch handler.Type {
case "cloudflare":
return handlers.NewCloudflareHandler(handler)
case "log":
return handlers.NewLogHandler(handler)
}
return nil
}