limiter

package
v1.0.25 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultLimit is the default concurrency limit
	DefaultLimit = 100
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	Host *client.Host
	Err  error
}

type Limiter

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

func NewLimiter

func NewLimiter(limit int) *Limiter

func (*Limiter) Add

func (l *Limiter) Add(delta int)

func (*Limiter) Done

func (l *Limiter) Done()

func (*Limiter) Error

func (l *Limiter) Error(host *client.Host, err error)

func (*Limiter) Errors

func (l *Limiter) Errors() []Error

func (*Limiter) Lock

func (l *Limiter) Lock()

func (*Limiter) Unlock

func (l *Limiter) Unlock()

func (*Limiter) Wait

func (l *Limiter) Wait()

Jump to

Keyboard shortcuts

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