go-fthealth: github.com/Financial-Times/go-fthealth/v1_1 Index | Files

package v1_1

import "github.com/Financial-Times/go-fthealth/v1_1"

Index

Package Files

check.go fthealth.go handler.go result.go

func ComputeOverallSeverity Uses

func ComputeOverallSeverity(result *HealthResult) uint8

func ComputeOverallStatus Uses

func ComputeOverallStatus(result *HealthResult) bool

func Handler Uses

func Handler(hc HC) func(w http.ResponseWriter, r *http.Request)

type Check Uses

type Check struct {
    ID               string
    Name             string
    Severity         uint8
    BusinessImpact   string
    TechnicalSummary string
    PanicGuide       string
    Checker          func() (string, error)
    Timeout          time.Duration
}

type CheckResult Uses

type CheckResult struct {
    ID               string    `json:"id"`
    Name             string    `json:"name"`
    Ok               bool      `json:"ok"`
    Severity         uint8     `json:"severity"`
    BusinessImpact   string    `json:"businessImpact"`
    TechnicalSummary string    `json:"technicalSummary"`
    PanicGuide       string    `json:"panicGuide"`
    CheckOutput      string    `json:"checkOutput"`
    LastUpdated      time.Time `json:"lastUpdated"`
    Ack              string    `json:"ack,omitempty"`
    PanicGuideIsLink bool      `json:"-"`
}

type ErrorMessage Uses

type ErrorMessage struct {
    Message string `json:"message"`
}

type FeedbackHealthCheck Uses

type FeedbackHealthCheck struct {
    HC
    // contains filtered or unexported fields
}

func NewFeedbackHealthCheck Uses

func NewFeedbackHealthCheck(hc HC, fb chan<- bool) FeedbackHealthCheck

type HC Uses

type HC interface {
    // contains filtered or unexported methods
}

type HealthCheck Uses

type HealthCheck struct {
    SystemCode  string
    Name        string
    Description string
    Checks      []Check
}

type HealthCheckSerial Uses

type HealthCheckSerial struct {
    HealthCheck
}

type HealthResult Uses

type HealthResult struct {
    SchemaVersion float64       `json:"schemaVersion"`
    SystemCode    string        `json:"systemCode"`
    Name          string        `json:"name"`
    Description   string        `json:"description"`
    Checks        []CheckResult `json:"checks"`
    Ok            bool          `json:"ok"`
    Severity      uint8         `json:"severity,omitempty"`
}

func RunCheck Uses

func RunCheck(hc HC) (result HealthResult)

type TimedHealthCheck Uses

type TimedHealthCheck struct {
    HealthCheck
    Timeout time.Duration
}

New type for fail-safe backward compatibility

Package v1_1 imports 8 packages (graph) and is imported by 25 packages. Updated 2018-11-21. Refresh now. Tools for package owners.