Documentation
¶
Index ¶
- func GetRequests() map[string]event.HandleResult
- func Initialize() error
- func Listeners() map[string]Listener
- func LoadFromPersistedState() error
- func RequestHandlingChanged(result event.HandleResult)
- func Save(toSave *Listener) error
- func SaveToPersistedState() error
- func StartListening()
- type Listener
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRequests ¶ added in v1.1.0
func GetRequests() map[string]event.HandleResult
GetRequests return an array of handle result sorted by started time
func Initialize ¶ added in v1.1.2
func Initialize() error
Initialize loads all listeners from the pesisted state ensuring at least one exists
func LoadFromPersistedState ¶ added in v1.1.2
func LoadFromPersistedState() error
LoadFromPersistedState loads all listeners from the files in the configuration directory into memory
func RequestHandlingChanged ¶ added in v1.1.0
func RequestHandlingChanged(result event.HandleResult)
RequestHandlingChanged stores or update the handle result
func Save ¶ added in v1.1.2
Save saves a listener to it's file, or to the default file if not specified
func SaveToPersistedState ¶ added in v1.1.2
func SaveToPersistedState() error
SaveToPersistedState save all listeners back to files
func StartListening ¶
func StartListening()
StartListening initializes all the listeners and bind them to the specified ports
Types ¶
type Listener ¶
type Listener struct {
CertificateFile string `json:"certificateFile" yaml:"certificateFile"`
EnabledUpstreams []string `json:"enabledUpstreams" yaml:"enabledUpstreams"`
KeyFile string `json:"keyFile" yaml:"keyFile"`
Name string `json:"name"`
Origin configuration.Origin `json:"-" yaml:"-"`
Port int `json:"port"`
}
Listener represents a listener that responds to incoming requests
Click to show internal directories.
Click to hide internal directories.