RegisterClusterPlugin is from package caddytls

Siva Chegondi 2019-04-23 05:10:25 +05:30
parent 26ceac8d61
commit 1e5f701961

@ -29,6 +29,7 @@ Start a new Go package with an init function and register your plugin with Caddy
```go ```go
import "github.com/mholt/caddy" import "github.com/mholt/caddy"
import "github.com/mholt/caddy/caddytls"
func init() { func init() {
// register a "generic" plugin, like a directive or middleware // register a "generic" plugin, like a directive or middleware
@ -45,7 +46,7 @@ func init() {
caddy.RegisterEventHook("eventName", myHookFn) caddy.RegisterEventHook("eventName", myHookFn)
// register a cluster plugin // register a cluster plugin
caddy.RegisterClusterPlugin("name", constructorFn) caddytls.RegisterClusterPlugin("name", constructorFn)
// add a function that wraps listeners for the HTTP server // add a function that wraps listeners for the HTTP server
// (it's more common for a directive to call this rather than a standalone plugin) // (it's more common for a directive to call this rather than a standalone plugin)