singleflight

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: MIT Imports: 1 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
}

Group manages all kinds of calls

func (*Group) Do

func (g *Group) Do(key string, fn func() (interface{}, error)) (interface{}, error)

Do 针对相同的key,保证多次调用Do(),都只会调用一次fn

Jump to

Keyboard shortcuts

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