fuse

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Copyright 2022 GoFast Author(http://chende.ren). All rights reserved. Use of this source code is governed by a MIT license

Copyright 2022 GoFast Author(http://chende.ren). All rights reserved. Use of this source code is governed by a MIT license

Copyright 2022 GoFast Author(http://chende.ren). All rights reserved. Use of this source code is governed by a MIT license

Copyright 2022 GoFast Author(http://chende.ren). All rights reserved. Use of this source code is governed by a MIT license

Index

Constants

This section is empty.

Variables

View Source
var ErrServiceUnavailable = errors.New("auto-breaker is open")

Functions

This section is empty.

Types

type Breaker

type Breaker interface {
	Name() string              // Name returns the name of the Breaker.
	Errors(join string) string // reason

	Allow() error         //
	Accept()              // allow successful.
	Reject(reason string) // allow failed.

	AcceptValue(v float64)                // allow successful.
	RejectValue(v float64, reason string) // allow failed.

}

A Breaker represents a circuit breaker.

func NewGBreaker

func NewGBreaker(name string, markLog bool) Breaker

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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