Documentation
¶
Index ¶
- func GenerateTLSCerts(outputDir string, serverCN string, serverSANs []string) (caCertPath, serverCertPath, serverKeyPath string, err error)
- func GetEphemeralPort() (int, error)
- func RunCommandInBackground(outputBuffer *bytes.Buffer, args ...string) *exec.Cmd
- func StartTestHttpServer(port int) (*http.Server, error)
- func StartTestHttpsServer(port int, certFile, keyFile string) (*http.Server, error)
- func WaitForPort(addr string, timeout time.Duration)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateTLSCerts ¶
func GenerateTLSCerts(outputDir string, serverCN string, serverSANs []string) (caCertPath, serverCertPath, serverKeyPath string, err error)
GenerateTLSCerts generates a CA, a server key, and a server certificate signed by the CA. It includes Subject Alternative Names (SANs) for modern TLS compliance. Returns paths to ca.crt, server.crt, and server.key.
func GetEphemeralPort ¶
GetEphemeralPort finds an available ephemeral port on localhost.
func RunCommandInBackground ¶
func StartTestHttpServer ¶
Helper to start a simple HTTP server (for non-TLS tests)
func StartTestHttpsServer ¶
Helper to start a simple HTTPS server with custom certs
func WaitForPort ¶
WaitForPort blocks until a TCP port is listening or timeout occurs.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.