concurrent

package
v1.34.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrLimit = errors.New("limit exceeded")

Functions

This section is empty.

Types

type KeyConcurrentLimit

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

func NewLimit

func NewLimit() *KeyConcurrentLimit

func (*KeyConcurrentLimit) Acquire

func (s *KeyConcurrentLimit) Acquire(key string, limit int64) error

func (*KeyConcurrentLimit) Get

func (s *KeyConcurrentLimit) Get(key string) int64

func (*KeyConcurrentLimit) Release

func (s *KeyConcurrentLimit) Release(key string)

func (*KeyConcurrentLimit) Running

func (s *KeyConcurrentLimit) Running() int

Jump to

Keyboard shortcuts

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