package
module
Version:
v0.0.0-...-2293720
Opens a new window with list of versions in this module.
Published: Oct 9, 2023
License: MIT
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
webserver
Bootstrap the creation of a HTTP(S) web server.
Documentation
¶
type Config struct {
Addr string `json:"address"`
Port int `json:"port"`
TLS TLSConfig `json:"tls"`
}
Config ...
Server is a wrapper around http.Server that provides a graceful shutdown and other helpful features.
NewServer creates a new server.
GetLogger returns the logger for the server.
Router returns the router for the server.
Run the web server (blocking).
SetLogger sets the logger for the server.
Start the web server asynchronously (does not block).
Stop gracefully stops the server.
type TLSConfig struct {
Enabled bool `json:"enabled"`
CertFile string `json:"certPath"`
KeyFile string `json:"keyPath"`
}
TLSConfig ...
Source Files
¶
Click to show internal directories.
Click to hide internal directories.