Skip to content

Commit

Permalink
remove Health.failed
Browse files Browse the repository at this point in the history
  • Loading branch information
endorama committed Oct 2, 2018
1 parent 6bbee17 commit aefe268
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions health.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ type Health struct {
StatusListener IStatusListener

active *sBool // indicates whether the healthcheck is actively running
failed *sBool // indicates whether the healthcheck has encountered a fatal error in one of its deps
configs []*Config
states map[string]State
statesLock sync.Mutex
Expand All @@ -139,7 +138,6 @@ func New() *Health {
states: make(map[string]State, 0),
runners: make(map[string]chan struct{}, 0),
active: newBool(),
failed: newBool(), // init as false
statesLock: sync.Mutex{},
}
}
Expand Down Expand Up @@ -269,11 +267,6 @@ func (h *Health) startRunner(cfg *Config, ticker *time.Ticker, stop <-chan struc
stateEntry.Status = "failed"
}

// Toggle the global failed state if check is configured as fatal
if cfg.Fatal {
h.failed.set(err != nil)
}

h.safeUpdateState(stateEntry)
}

Expand Down

0 comments on commit aefe268

Please sign in to comment.