Documentation ¶
Index ¶
- func DefaultRspCachePredicate(rsp Rsp, _ map[string]string) bool
- func DefaultRspFailedPredicate(rsp Rsp, _ map[string]string) bool
- func NewBulkheadPlugin(name string, config *BulkheadConfig) (bulkhead.Bulkhead, ReverseProxyDecorator)
- func NewCachePlugin(name string, config *CacheConfig) (cache.Cache[Req, Rsp], ReverseProxyDecorator)
- func NewCircuitBreakerPlugin(name string, config *CircuitBreakerConfig) (circuitbreaker.CircuitBreaker, ReverseProxyDecorator)
- func NewFallbackPlugin(config *FallbackConfig) ReverseProxyDecorator
- func NewRateLimiterPlugin(name string, config *RateLimiterConfig) (ratelimiter.RateLimiter, ReverseProxyDecorator)
- func NewRetryPlugin(name string, config *RetryConfig) (retry.Retry, ReverseProxyDecorator)
- func NewTimeLimiterPlugin(name string, config *TimeLimiterConfig) (timelimiter.TimeLimiter, ReverseProxyDecorator)
- func RegisterFallbackFunction(name string, function FallbackFunction) error
- func RegisterRspCachePredicate(name string, predicate RspCachePredicate) error
- func RegisterRspFailedPredicate(name string, predicate RspFailedPredicate) error
- type BulkheadConfig
- type CacheConfig
- type CircuitBreakerConfig
- type FallbackConfig
- type FallbackFunction
- type RateLimiterConfig
- type RetryConfig
- type RspCachePredicate
- type RspFailedPredicate
- type TimeLimiterConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewBulkheadPlugin ¶
func NewBulkheadPlugin(name string, config *BulkheadConfig) (bulkhead.Bulkhead, ReverseProxyDecorator)
func NewCachePlugin ¶
func NewCachePlugin(name string, config *CacheConfig) (cache.Cache[Req, Rsp], ReverseProxyDecorator)
func NewCircuitBreakerPlugin ¶
func NewCircuitBreakerPlugin(name string, config *CircuitBreakerConfig) (circuitbreaker.CircuitBreaker, ReverseProxyDecorator)
func NewFallbackPlugin ¶
func NewFallbackPlugin(config *FallbackConfig) ReverseProxyDecorator
func NewRateLimiterPlugin ¶
func NewRateLimiterPlugin(name string, config *RateLimiterConfig) (ratelimiter.RateLimiter, ReverseProxyDecorator)
func NewRetryPlugin ¶
func NewRetryPlugin(name string, config *RetryConfig) (retry.Retry, ReverseProxyDecorator)
func NewTimeLimiterPlugin ¶
func NewTimeLimiterPlugin(name string, config *TimeLimiterConfig) (timelimiter.TimeLimiter, ReverseProxyDecorator)
func RegisterFallbackFunction ¶
func RegisterFallbackFunction(name string, function FallbackFunction) error
func RegisterRspCachePredicate ¶
func RegisterRspCachePredicate(name string, predicate RspCachePredicate) error
func RegisterRspFailedPredicate ¶
func RegisterRspFailedPredicate(name string, predicate RspFailedPredicate) error
Types ¶
type BulkheadConfig ¶
type CacheConfig ¶
type CircuitBreakerConfig ¶
type CircuitBreakerConfig struct { Disabled string SlidingWindowType string SlidingWindowSize string MinimumNumberOfCalls string FailureRateThreshold string SlowCallRateThreshold string SlowCallDurationThreshold string ResponseFailedPredicate string ResponseFailedPredicateContext map[string]string AutomaticTransitionFromOpenToHalfOpen string WaitIntervalInOpenState string PermittedNumberOfCallsInHalfOpenState string MaxWaitDurationInHalfOpenState string WhenOverLoadResponse string }
type FallbackConfig ¶
type FallbackFunction ¶
func GetFallbackFunction ¶
func GetFallbackFunction(name string) FallbackFunction
type RateLimiterConfig ¶
type RetryConfig ¶
type RspCachePredicate ¶
func GetRspCachePredicate ¶
func GetRspCachePredicate(name string) RspCachePredicate
type RspFailedPredicate ¶
func GetRspFailedPredicate ¶
func GetRspFailedPredicate(name string) RspFailedPredicate
type TimeLimiterConfig ¶
Click to show internal directories.
Click to hide internal directories.