grpchystrix

package
v0.0.0-...-32e62f0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UnaryClientInterceptor

func UnaryClientInterceptor(commandName string, opts ...Option) grpc.UnaryClientInterceptor

Types

type Option

type Option func(*options)

Option represents the hystrix client options

func WithErrorPercentThreshold

func WithErrorPercentThreshold(errorPercentThreshold int) Option

WithErrorPercentThreshold sets hystrix error percent threshold

func WithFallbackFunc

func WithFallbackFunc(fn func(ctx context.Context, err error) error) Option

WithFallbackFunc sets the fallback function

func WithMaxConcurrentRequests

func WithMaxConcurrentRequests(maxConcurrentRequests int) Option

WithMaxConcurrentRequests sets hystrix max concurrent requests

func WithRequestVolumeThreshold

func WithRequestVolumeThreshold(requestVolumeThreshold int) Option

WithRequestVolumeThreshold sets hystrix request volume threshold

func WithSleepWindow

func WithSleepWindow(sleepWindow time.Duration) Option

WithSleepWindow sets hystrix sleep window

func WithStatsDCollector

func WithStatsDCollector(addr, prefix string, sampleRate float32, flushBytes int) Option

WithStatsDCollector exports hystrix metrics to a statsD backend

func WithTimeout

func WithTimeout(timeout time.Duration) Option

WithTimeout sets hystrix timeout

Jump to

Keyboard shortcuts

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