singledo

package
v0.0.0-...-bba741c Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2025 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Group

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

func NewSingleGroup

func NewSingleGroup[T any](wait time.Duration) *Group[T]

func (*Group[T]) Do

func (p *Group[T]) Do(key string, fn func() (T, error)) (v T, err error)

type Single

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

func NewSingle

func NewSingle[T any](wait time.Duration) *Single[T]

func (*Single[T]) Do

func (s *Single[T]) Do(fn func() (T, error)) (v T, err error)

func (*Single[T]) Reset

func (s *Single[T]) Reset()

Jump to

Keyboard shortcuts

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