Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewInMemoryBackend ¶
func NewInMemoryBackend() circuitry.StorageBackender
NewInMemoryBackend creates a new in memory storage backend
func WithInMemoryBackend ¶
func WithInMemoryBackend() circuitry.SettingsOption
WithInMemoryBackend creates an in memory backend storage for a circuit breaker
Types ¶
type InMemoryBackend ¶
type InMemoryBackend struct {
// contains filtered or unexported fields
}
InMemoryBackend defines an in memory backend designed to be used primarily for proofs of concept and testing
func (*InMemoryBackend) Lock ¶
Lock provides a lock around the given circuit state to protect the atomicity of the data
func (*InMemoryBackend) Retrieve ¶
func (b *InMemoryBackend) Retrieve(_ context.Context, name string) (circuitry.CircuitInformation, error)
Retrieve fetches the desired circuit state from memory
func (*InMemoryBackend) Store ¶
func (b *InMemoryBackend) Store(_ context.Context, name string, ci circuitry.CircuitInformation) error
Store saves the circuit information in memory
Click to show internal directories.
Click to hide internal directories.