mirror of
				https://github.com/caddyserver/caddy.git
				synced 2025-10-31 10:37:24 -04:00 
			
		
		
		
	Implement CertRenewEvent (#1879)
This commit is contained in:
		
							parent
							
								
									118cf5f240
								
							
						
					
					
						commit
						f878247a18
					
				| @ -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" | ||||
| 	StartupEvent   EventName = "startup" | ||||
| 	ShutdownEvent  EventName = "shutdown" | ||||
| 	CertRenewEvent EventName = "certrenew" | ||||
| ) | ||||
| 
 | ||||
| // EventHook is a type which holds information about a startup hook plugin. | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user