Versions in this module Expand all Collapse all v4 v4.0.0 Jan 19, 2024 Changes in this version + type FallbackStats struct + ErrConcurrencyLimitRejects faststats.RollingCounter + ErrFailures faststats.RollingCounter + Successes faststats.RollingCounter + func FindFallbackMetrics(c *circuit.Circuit) *FallbackStats + func (r *FallbackStats) ErrConcurrencyLimitReject(_ context.Context, now time.Time) + func (r *FallbackStats) ErrFailure(_ context.Context, now time.Time, _ time.Duration) + func (r *FallbackStats) SetConfigNotThreadSafe(config FallbackStatsConfig) + func (r *FallbackStats) Success(_ context.Context, now time.Time, _ time.Duration) + func (r *FallbackStats) Var() expvar.Var + type FallbackStatsConfig struct + Now func() time.Time + RollingStatsDuration time.Duration + RollingStatsNumBuckets int + func (r *FallbackStatsConfig) Merge(other FallbackStatsConfig) + type RunStats struct + ErrBadRequests faststats.RollingCounter + ErrConcurrencyLimitRejects faststats.RollingCounter + ErrFailures faststats.RollingCounter + ErrInterrupts faststats.RollingCounter + ErrShortCircuits faststats.RollingCounter + ErrTimeouts faststats.RollingCounter + Latencies faststats.RollingPercentile + Successes faststats.RollingCounter + func FindCommandMetrics(c *circuit.Circuit) *RunStats + func (r *RunStats) Config() RunStatsConfig + func (r *RunStats) ErrBadRequest(_ context.Context, now time.Time, duration time.Duration) + func (r *RunStats) ErrConcurrencyLimitReject(_ context.Context, now time.Time) + func (r *RunStats) ErrFailure(_ context.Context, now time.Time, duration time.Duration) + func (r *RunStats) ErrInterrupt(_ context.Context, now time.Time, duration time.Duration) + func (r *RunStats) ErrShortCircuit(_ context.Context, now time.Time) + func (r *RunStats) ErrTimeout(_ context.Context, now time.Time, duration time.Duration) + func (r *RunStats) ErrorPercentage() float64 + func (r *RunStats) ErrorPercentageAt(now time.Time) float64 + func (r *RunStats) ErrorsAt(now time.Time) int64 + func (r *RunStats) LegitimateAttemptsAt(now time.Time) int64 + func (r *RunStats) SetConfigNotThreadSafe(config RunStatsConfig) + func (r *RunStats) Success(_ context.Context, now time.Time, duration time.Duration) + func (r *RunStats) Var() expvar.Var + type RunStatsConfig struct + Now func() time.Time + RollingPercentileBucketSize int + RollingPercentileDuration time.Duration + RollingPercentileNumBuckets int + RollingStatsDuration time.Duration + RollingStatsNumBuckets int + func (r *RunStatsConfig) Merge(other RunStatsConfig) + type StatFactory struct + FallbackConfig FallbackStatsConfig + RunConfig RunStatsConfig + func (s *StatFactory) CreateConfig(circuitName string) circuit.Config + func (s *StatFactory) FallbackStats(circuitName string) *FallbackStats + func (s *StatFactory) RunStats(circuitName string) *RunStats Other modules containing this package github.com/cep21/circuit github.com/cep21/circuit/v3