singleflight

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2026 License: MIT 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 struct {
	// contains filtered or unexported fields
}

func NewGroup

func NewGroup() *Group

func (*Group) Do

func (g *Group) Do(key string, fn func() (any, error)) (any, bool, error)

func (*Group) DoChan

func (g *Group) DoChan(key string, fn func() (any, error)) <-chan Result

func (*Group) Forget

func (g *Group) Forget(key string)

type Result

type Result struct {
	Val    any
	Err    error
	Shared bool
}

Jump to

Keyboard shortcuts

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