Documentation
¶
Index ¶
Constants ¶
const ( PemTypePrivateKey = "PRIVATE KEY" PemTypeCertificate = "CERTIFICATE" )
Variables ¶
This section is empty.
Functions ¶
func ListenAddr ¶
ListenAddr resolves a listen address string into a host:port pair, applying defaults for missing host or port. When tls is true the default port is "https" (443); otherwise it is "http" (80).
func TLSConfig ¶
TLSConfig creates a tls.Config from raw PEM-encoded certificate and key data. The data slices may each contain a single PEM block, or they may be concatenated (cert + key in one slice). name sets the ServerName field; when verify is false, client certificate verification is skipped.
func ValidateCert ¶
ValidateCert checks that the given PEM-encoded certificate and key form a valid key pair and that the leaf certificate has not expired. It is intended for use at plan time to catch configuration errors before Apply.
Types ¶
type Opt ¶
type Opt func(*opt) error
func WithIdleTimeout ¶
Set the idle timeout for keep-alive connections
func WithReadTimeout ¶
Set the read timeout for the HTTP server
func WithWriteTimeout ¶
Set the write timeout for the HTTP server