2021-02-14 18:47:15 +00:00
|
|
|
package options
|
|
|
|
|
|
|
|
// Server represents the configuration for an HTTP(S) server
|
|
|
|
type Server struct {
|
2021-06-02 20:41:30 +02:00
|
|
|
// BindAddress is the address on which to serve traffic.
|
2021-02-14 18:47:15 +00:00
|
|
|
// Leave blank or set to "-" to disable.
|
|
|
|
BindAddress string
|
|
|
|
|
2021-06-02 20:41:30 +02:00
|
|
|
// SecureBindAddress is the address on which to serve secure traffic.
|
2021-02-14 18:47:15 +00:00
|
|
|
// Leave blank or set to "-" to disable.
|
|
|
|
SecureBindAddress string
|
|
|
|
|
|
|
|
// TLS contains the information for loading the certificate and key for the
|
|
|
|
// secure traffic.
|
|
|
|
TLS *TLS
|
|
|
|
}
|
|
|
|
|
|
|
|
// TLS contains the information for loading a TLS certifcate and key.
|
|
|
|
type TLS struct {
|
2021-06-02 20:41:30 +02:00
|
|
|
// Key is the TLS key data to use.
|
2021-02-14 18:47:15 +00:00
|
|
|
// Typically this will come from a file.
|
|
|
|
Key *SecretSource
|
|
|
|
|
|
|
|
// Cert is the TLS certificate data to use.
|
|
|
|
// Typically this will come from a file.
|
|
|
|
Cert *SecretSource
|
|
|
|
}
|