hystrix

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMaxConcurrency = hystrix.ErrMaxConcurrency

	ErrCircuitOpen = hystrix.ErrCircuitOpen

	ErrTimeout = hystrix.ErrTimeout
)

Functions

func Configure

func Configure(cmds map[string]CommandConfig)

func ConfigureCommand

func ConfigureCommand(name string, config CommandConfig)

func GetCircuitSettings

func GetCircuitSettings() map[string]*Settings

func WithUnaryClient

func WithUnaryClient(opts ...Option) grpc.DialOption

WithUnaryClient 客户端普通方法调用添加 hystrix 熔断器

Types

type CommandConfig

type CommandConfig = hystrix.CommandConfig

type Filter

type Filter func(err error) error

type Option

type Option struct {
	grpc.EmptyCallOption
	// contains filtered or unexported fields
}

func WithFilter

func WithFilter(f Filter) Option

WithFilter 过滤 error

type Settings

type Settings = hystrix.Settings

Jump to

Keyboard shortcuts

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