17 lines
306 B
Go
17 lines
306 B
Go
|
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
|
||
|
}
|