grpc_hystrix

package
v0.0.20 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StreamClientInterceptor

func StreamClientInterceptor(opts ...Option) grpc.StreamClientInterceptor

func UnaryClientInterceptor

func UnaryClientInterceptor(opts ...Option) grpc.UnaryClientInterceptor

Types

type Option

type Option func(opts *Options)

Option represents the hystrix client options

func WithCommandName

func WithCommandName(name string) Option

WithCommandName sets the hystrix command name

func WithErrorPercentThreshold

func WithErrorPercentThreshold(errorPercentThreshold int) Option

WithErrorPercentThreshold sets hystrix error percent threshold

func WithHystrixTimeout

func WithHystrixTimeout(timeout time.Duration) Option

WithHystrixTimeout sets hystrix timeout

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 int) Option

WithSleepWindow sets hystrix sleep window

type Options

type Options struct {
	HystrixTimeout         time.Duration
	HystrixCommandName     string
	MaxConcurrentRequests  int
	RequestVolumeThreshold int
	SleepWindow            int
	ErrorPercentThreshold  int
}

Jump to

Keyboard shortcuts

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