breaker

package
v0.1.33 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClientBreakInterceptor

func ClientBreakInterceptor(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn,
	invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error

ClientBreakInterceptor 客户端熔断器

func WithServerBreakerInterceptor

func WithServerBreakerInterceptor() grpc.UnaryServerInterceptor

WithServerBreakerInterceptor rpc 服务端熔断器

Types

type Breaker

type Breaker interface {
	Allow() error
	MarkSuccess()
	MarkFailed()
}

type Group

type Group interface {
	Get(string) Breaker
	// contains filtered or unexported methods
}

func NewSreBreakerGroup added in v0.1.12

func NewSreBreakerGroup(opts ...sre.Option) Group

type SreBreakerGroup

type SreBreakerGroup struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func (*SreBreakerGroup) Get

func (g *SreBreakerGroup) Get(key string) Breaker

Jump to

Keyboard shortcuts

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