wrapper

package
v0.0.0-...-0a789b5 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServiceWrapper

func NewServiceWrapper(name string)

Types

type Config

type Config struct {
	Namespace              string
	Timeout                time.Duration
	MaxConcurrentRequests  int
	RequestVolumeThreshold uint64
	SleepWindow            time.Duration
	ErrorPercentThreshold  int
}

Config broker config.

type Group

type Group struct {
	// contains filtered or unexported fields
}

Group represents a class of CircuitBreaker and forms a namespace in which units of CircuitBreaker.

func NewGroup

func NewGroup(conf *Config) *Group

NewGroup new a breaker group container, if conf nil use default conf.

func (*Group) Do

func (g *Group) Do(name string, run func() error) (err error)

Do Warped name with namespace for Hystrix DO.

func (*Group) Reload

func (g *Group) Reload(conf *Config)

Reload reload the group by specified config, this may let all inner breaker reset to a new one.

Jump to

Keyboard shortcuts

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