breaker

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 24, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package breaker stops trade worker if it violates its failure threshold.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CircuitBreaker

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

func NewCircuitBreaker

func NewCircuitBreaker() *CircuitBreaker

func (*CircuitBreaker) IncFailures

func (cb *CircuitBreaker) IncFailures()

func (CircuitBreaker) WorkerMustExit

func (cb CircuitBreaker) WorkerMustExit() bool

WorkerMustExit returns true if trade worker is unhealthy and must be killed.

Jump to

Keyboard shortcuts

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