INNER CODE UNIT · Go
natsLivenessCheck
wasmCloud/wasmCloud · runtime-operator/cmd/main.go:349
func natsLivenessCheck(nc *nats.Conn) healthz.Checker {
return func(_ *http.Request) error {
if nc.IsClosed() {
return errors.New("nats connection permanently closed")
}
return nil
}
}
// splitCSVList parses a comma-separated string into a trimmed, non-empty
// slice of values. Returns nil for an empty input.
func splitCSVList(raw string) []string {
if raw == "" {
return nil
}
parts := strings.Split(raw, ",")
out := make([]string, 0, len(parts))
for _, p := range parts {