sync

package
v0.8.7 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewWeightedSemaphore

func NewWeightedSemaphore(size int64) *semaphore.Weighted

Types

type StringMap added in v0.7.6

type StringMap[T any] struct {
	// contains filtered or unexported fields
}

func NewStringMap added in v0.7.6

func NewStringMap[T any]() *StringMap[T]

func NewStringMapFromMap added in v0.7.6

func NewStringMapFromMap[T any](m map[string]T) *StringMap[T]

func NewStringMapWithLen added in v0.7.6

func NewStringMapWithLen[T any](len int) *StringMap[T]

func (*StringMap[T]) Delete added in v0.7.6

func (m *StringMap[T]) Delete(key string)

func (*StringMap[T]) Get added in v0.7.6

func (m *StringMap[T]) Get(key string) (T, bool)

func (*StringMap[T]) GetMap added in v0.7.6

func (m *StringMap[T]) GetMap() map[string]T

func (*StringMap[T]) Set added in v0.7.6

func (m *StringMap[T]) Set(key string, value T)

type WeightedSemaphore

type WeightedSemaphore interface {
	TryAcquire(int64) bool
	Acquire(context.Context, int64) error
	Release(int64)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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