barrier

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Barrier

type Barrier struct {
	Capacity     int
	Value        int
	RefillPeriod time.Duration
	// contains filtered or unexported fields
}

func New

func New(cap int, rate time.Duration) *Barrier

func (*Barrier) IsBadState

func (b *Barrier) IsBadState() bool

func (*Barrier) RecordBadEvent

func (b *Barrier) RecordBadEvent()

func (*Barrier) Start

func (b *Barrier) Start(ctx context.Context) error

Jump to

Keyboard shortcuts

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