Files
mtusi2026lab5-fork/infra/s3-health.go
T

21 lines
351 B
Go

// Standalone health probe for the minimal MinIO container.
package main
import (
"net/http"
"os"
"time"
)
func main() {
client := http.Client{Timeout: time.Second}
response, err := client.Get("http://127.0.0.1:9000/minio/health/ready")
if err != nil {
os.Exit(1)
}
response.Body.Close()
if response.StatusCode != 200 {
os.Exit(1)
}
}