mirror of
https://github.com/caddyserver/caddy.git
synced 2025-01-06 22:40:31 -05:00
Implement CertRenewEvent (#1879)
This commit is contained in:
parent
118cf5f240
commit
f878247a18
2 changed files with 7 additions and 3 deletions
|
@ -345,6 +345,9 @@ func (c *ACMEClient) Renew(name string) error {
|
|||
return errors.New("too many renewal attempts; last error: " + err.Error())
|
||||
}
|
||||
|
||||
// Executes Cert renew events
|
||||
caddy.EmitEvent(caddy.CertRenewEvent, name)
|
||||
|
||||
return saveCertResource(storage, newCertMeta)
|
||||
}
|
||||
|
||||
|
|
|
@ -231,10 +231,11 @@ func RegisterPlugin(name string, plugin Plugin) {
|
|||
// EventName represents the name of an event used with event hooks.
|
||||
type EventName string
|
||||
|
||||
// Define the event names for the startup and shutdown events
|
||||
// Define names for the various events
|
||||
const (
|
||||
StartupEvent EventName = "startup"
|
||||
ShutdownEvent EventName = "shutdown"
|
||||
CertRenewEvent EventName = "certrenew"
|
||||
)
|
||||
|
||||
// EventHook is a type which holds information about a startup hook plugin.
|
||||
|
|
Loading…
Reference in a new issue