package
Version:
v0.0.0-...-ffdedf7
Opens a new window with list of versions in this module.
Published: Aug 1, 2024
License: MIT
Opens a new window with license information.
Imports: 13
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Listen listens on the TCP network address addr and returns a net.Listener.
If TLS is enabled, it listens for TLS connections.
New returns a new HTTP server.
It should be started with a listener returned by Listen.
type Config struct {
Host string `env:"HOST"`
Port int `env:"PORT"`
TLS TLSConfig `envPrefix:"TLS_"`
}
Config holds the server configuration.
The zero value is a valid configuration.
type TLSConfig struct {
Enabled bool `env:"ENABLED"`
CertFile string `env:"CERT_FILE"`
KeyFile string `env:"KEY_FILE"`
}
TLSConfig holds the TLS configuration.
The zero value is a valid configuration.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.