Skip to content

Draft Specification for V3

Yoshiyuki Mineo edited this page Oct 14, 2024 · 2 revisions
  • Make all the conditions of state transitions customizable
    • Replace ReadyToTrip with ReadyToOpen
    • Add ReadyToClose to specify the condition of the transition from Half-Open to Close
    • Add ReadyToReopen to specify the condition of the transition from Half-Open to Open
type Settings struct {
	Name          string
	Interval      time.Duration
	Timeout       time.Duration
	ReadyToOpen   func(counts Counts) bool
	ReadyToClose  func(counts Counts) bool
	ReadyToReopen func(counts Counts) bool
	OnStateChange func(name string, from State, to State)
	IsSuccessful  func(err error) bool
}
Clone this wiki locally