resilience

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 2, 2026 License: Apache-2.0 Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type State

type State struct {
	// contains filtered or unexported fields
}

func New

func New() *State

func (*State) Active

func (s *State) Active(n string) int

func (*State) CircuitOpen

func (s *State) CircuitOpen(n string, reset time.Duration) bool

func (*State) Cooldown

func (s *State) Cooldown(n string, d time.Duration)

func (*State) Cooling

func (s *State) Cooling(n string) bool

func (*State) Fails

func (s *State) Fails(n string) int

func (*State) Failure

func (s *State) Failure(n string, max int)

func (*State) Latency

func (s *State) Latency(n string) time.Duration

func (*State) LockedOut

func (s *State) LockedOut(n string) bool

func (*State) Lockout

func (s *State) Lockout(n string, d time.Duration)

func (*State) Release

func (s *State) Release(n string)

func (*State) ResetLockout

func (s *State) ResetLockout(n string)

func (*State) Success

func (s *State) Success(n string, lat time.Duration)

func (*State) Successes

func (s *State) Successes(n string) int

func (*State) TotalRequests

func (s *State) TotalRequests(n string) int

func (*State) TryAcquire

func (s *State) TryAcquire(n string, max int) bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL