server

package
v0.6.15 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 14, 2023 License: Apache-2.0 Imports: 3 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EmitEvent

func EmitEvent(event EventName, info interface{})

EmitEvent executes the different hooks passing the EventType as an argument. This is a blocking function. Hook developers should use 'go' keyword if they don't want to block Caddy.

func RegisterEventHook

func RegisterEventHook(name EventName, hook ...EventHook) error

Types

type EventHook

type EventHook func(eventType EventName, eventInfo interface{}) error

type EventName

type EventName string
const (
	StartupEvent         EventName = "startup"
	ShutdownEvent        EventName = "shutdown"
	CertRenewEvent       EventName = "certrenew"
	InstanceStartupEvent EventName = "instancestartup"
	InstanceRestartEvent EventName = "instancerestart"
	RegistryChangeEvent  EventName = "registryChange"
	//ConfigChangeEvent should use the all config data as info
	ConfigChangeEvent EventName = "configChange"
)

type Options

type Options struct {
	ServerName string
	Address    string
}

type Server

type Server interface {
	Run(graceful func())
	Shutdown()
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL