mirror of
https://github.com/caddyserver/caddy.git
synced 2025-11-28 09:15:28 -05:00
RegisterClusterPlugin is from package caddytls
parent
26ceac8d61
commit
1e5f701961
@ -29,6 +29,7 @@ Start a new Go package with an init function and register your plugin with Caddy
|
||||
|
||||
```go
|
||||
import "github.com/mholt/caddy"
|
||||
import "github.com/mholt/caddy/caddytls"
|
||||
|
||||
func init() {
|
||||
// register a "generic" plugin, like a directive or middleware
|
||||
@ -45,7 +46,7 @@ func init() {
|
||||
caddy.RegisterEventHook("eventName", myHookFn)
|
||||
|
||||
// register a cluster plugin
|
||||
caddy.RegisterClusterPlugin("name", constructorFn)
|
||||
caddytls.RegisterClusterPlugin("name", constructorFn)
|
||||
|
||||
// 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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user