Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Status ¶
Status is the result of running a checker, if the service is GoodToGo then it can serve requests. If the message isn't GoodToGo then the message should be in plain text "describing the nature of the problem that prevents the application being good to go. This text should be sufficient for a non-domain expert to be able to resolve the problem"
type StatusChecker ¶
type StatusChecker func() Status
StatusChecker is the function signature which a checker needs to implement (no parameters and returns a Status)
func FailAtEndSequentialChecker ¶
func FailAtEndSequentialChecker(checkers []StatusChecker) StatusChecker
FailAtEndSequentialChecker composes multiple checkers into one that are executed in sequence. All checkers are executed.
func FailFastParallelCheck ¶
func FailFastParallelCheck(checkers []StatusChecker) StatusChecker
FailFastParallelCheck creates a composite checker that will run all checkers simultaneously. As soon as any of the checkers fail then the other checkers are ignored.
func FailFastSequentialChecker ¶
func FailFastSequentialChecker(checkers []StatusChecker) StatusChecker
FailFastSequentialChecker composes multiple checkers into one that are executed in sequence. Execution stops as soon as on checker fails.
func (StatusChecker) RunCheck ¶
func (check StatusChecker) RunCheck() Status
RunCheck executes a checker and returns the result as a status