Documentation ¶
Index ¶
- Constants
- func DecorateConsumer[T any](bulkhead Bulkhead, fn func(T) error) func(T) error
- func DecorateFunction[T any, R any](bulkhead Bulkhead, fn func(T) (R, error)) func(T) (R, error)
- func DecorateRunnable(bulkhead Bulkhead, fn func() error) func() error
- func DecorateSupplier[T any](bulkhead Bulkhead, fn func() (T, error)) func() (T, error)
- type Bulkhead
- type Config
- type ConfigBuilder
- type Event
- type EventListener
- type EventType
- type FinishedEvent
- type FullError
- type Metrics
- type PermittedEvent
- type RejectedEvent
Constants ¶
View Source
const DefaultMaxConcurrentCalls int64 = 25
View Source
const DefaultMaxWaitDuration time.Duration = 0
Variables ¶
This section is empty.
Functions ¶
func DecorateConsumer ¶
func DecorateFunction ¶
func DecorateRunnable ¶
Types ¶
type Bulkhead ¶
type Bulkhead interface { Name() string Metrics() Metrics EventListener() EventListener Acquire() error Release() }
func NewBulkhead ¶
func NewBulkhead(name string, configs ...ConfigBuilder) Bulkhead
type ConfigBuilder ¶
type ConfigBuilder func(*Config)
func WithMaxConcurrentCalls ¶
func WithMaxConcurrentCalls(maxConcurrentCalls int64) ConfigBuilder
func WithMaxWaitDuration ¶
func WithMaxWaitDuration(maxWaitDuration time.Duration) ConfigBuilder
type EventListener ¶
type EventListener interface { OnPermittedFunc(func(PermittedEvent)) EventListener OnRejectedFunc(func(RejectedEvent)) EventListener OnFinishedFunc(func(FinishedEvent)) EventListener DismissPermittedFunc(func(PermittedEvent)) EventListener DismissRejectedFunc(func(RejectedEvent)) EventListener DismissFinishedFunc(func(FinishedEvent)) EventListener OnPermitted(fn.Consumer[PermittedEvent]) EventListener OnRejected(fn.Consumer[RejectedEvent]) EventListener OnFinished(fn.Consumer[FinishedEvent]) EventListener DismissPermitted(fn.Consumer[PermittedEvent]) EventListener DismissRejected(fn.Consumer[RejectedEvent]) EventListener DismissFinished(fn.Consumer[FinishedEvent]) EventListener }
type FinishedEvent ¶ added in v0.4.1
type FinishedEvent interface { Event }
type PermittedEvent ¶ added in v0.4.1
type PermittedEvent interface { Event }
type RejectedEvent ¶ added in v0.4.1
type RejectedEvent interface { Event }
Click to show internal directories.
Click to hide internal directories.