callback

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2019 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//Open is a state to indicate that Circuit state is Open
	Open = "Open"
	//Close is a state to indicate that Circuit state is Close
	Close = "Close"
	//AllowSingle is a state to indicate that Circuit state is AllowSingle or trying to Open Circuit
	AllowSingle = "Allow Single"
)

Variables

This section is empty.

Functions

func Invoke

func Invoke(name string, state State)

Invoke is a function to invoke Callback function in a goroutine on State change

func Register

func Register(name string, callbackFunc stateFunc)

Register adds callback for a circuit

Types

type State

type State string

State is a type to hold Circuit-state this will be used while calling stateFunc on State change

Jump to

Keyboard shortcuts

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