syncing

package module
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2025 License: BSD-3-Clause Imports: 5 Imported by: 12

README

go-syncing

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Funnel added in v0.3.1

type Funnel[T comparable] interface {
	Valve(name T, call func())
}

func NewFunnel added in v0.3.1

func NewFunnel[T comparable]() Funnel[T]

type Group

type Group interface {
	Wait()
	Background(call func())
	Run(call func())
}

func NewGroup

func NewGroup() Group

type Limiter added in v0.3.1

type Limiter interface {
	Tap(ctx context.Context) error
}

func NewLimiter added in v0.3.1

func NewLimiter(ctx context.Context, count int, interval time.Duration) Limiter

type Lock

type Lock interface {
	RLock(call func())
	Lock(call func())
}

func NewLock

func NewLock() Lock

type Map added in v0.3.1

type Map[K comparable, V any] struct {
	// contains filtered or unexported fields
}

func NewMap added in v0.3.1

func NewMap[K comparable, V any](size uint) *Map[K, V]

func (*Map[K, V]) Del added in v0.3.1

func (v *Map[K, V]) Del(key K)

func (*Map[K, V]) Extract added in v0.3.1

func (v *Map[K, V]) Extract(key K) (val V, ok bool)

func (*Map[K, V]) Get added in v0.3.1

func (v *Map[K, V]) Get(key K) (val V, ok bool)

func (*Map[K, V]) Keys added in v0.3.1

func (v *Map[K, V]) Keys() []K

func (*Map[K, V]) Reset added in v0.3.1

func (v *Map[K, V]) Reset()

func (*Map[K, V]) Set added in v0.3.1

func (v *Map[K, V]) Set(key K, val V)

type Slice added in v0.3.1

type Slice[V any] struct {
	// contains filtered or unexported fields
}

func NewSlice added in v0.3.1

func NewSlice[V any](size uint) *Slice[V]

func (*Slice[V]) Append added in v0.3.1

func (v *Slice[V]) Append(val ...V)

func (*Slice[V]) Extract added in v0.3.1

func (v *Slice[V]) Extract() []V

type Switch

type Switch interface {
	On() bool
	Off() bool
	IsOn() bool
	IsOff() bool
}

func NewSwitch

func NewSwitch() Switch

Jump to

Keyboard shortcuts

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