breaker

package
v0.5.0-beta5.3 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Breaker

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

func New

func New(on bool) *Breaker

func (*Breaker) DoIfBreakerOn

func (breaker *Breaker) DoIfBreakerOn(ctx context.Context, d func(ctx context.Context)) bool

func (*Breaker) IsOn

func (breaker *Breaker) IsOn() bool

func (*Breaker) Off

func (breaker *Breaker) Off(reason string)

func (*Breaker) OffChan

func (breaker *Breaker) OffChan() <-chan struct{}

func (*Breaker) On

func (breaker *Breaker) On(reason string)

func (*Breaker) OnChan

func (breaker *Breaker) OnChan() <-chan struct{}

func (*Breaker) WaitBreakerOn

func (breaker *Breaker) WaitBreakerOn(ctx context.Context, d func(ctx context.Context) (doAgain bool)) int

ctn is continue

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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