open-vault/vendor/github.com/couchbase/gocb/v2/circuitbreaker.go
Michael Golowka bd79fbafb3
Add couchbase, elasticsearch, and mongodbatlas back (#10222)
Updated the `Serve` function so these can be added back into Vault
2020-10-22 17:20:17 -06:00

19 lines
606 B
Go

package gocb
import "time"
// CircuitBreakerCallback is the callback used by the circuit breaker to determine if an error should count toward
// the circuit breaker failure count.
type CircuitBreakerCallback func(error) bool
// CircuitBreakerConfig are the settings for configuring circuit breakers.
type CircuitBreakerConfig struct {
Disabled bool
VolumeThreshold int64
ErrorThresholdPercentage float64
SleepWindow time.Duration
RollingWindow time.Duration
CompletionCallback CircuitBreakerCallback
CanaryTimeout time.Duration
}