breaker

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2022 License: Apache-2.0 Imports: 10 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 ExampleInterceptor

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

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
}

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