INNER CODE UNIT · Go

client

orneryd/NornicDB · cmd/eval/main.go:526

	client := newSafeClient(5 * time.Second)
	resp, err := client.Get(healthURL)
	if err != nil {
		return err
	}
	defer resp.Body.Close()
	if resp.StatusCode != http.StatusOK {
		return fmt.Errorf("unhealthy: status %d", resp.StatusCode)
	}
	return nil
}

func parseThresholds(s string) eval.Thresholds {
	t := eval.DefaultThresholds()
	for _, pair := range strings.Split(s, ",") {
		parts := strings.SplitN(pair, "=", 2)
		if len(parts) != 2 {
			continue

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…