singleflight

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package singleflight provides a duplicate function call suppression mechanism.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComposeFlightLock added in v0.1.2

func ComposeFlightLock(fn func() (interface{}, error), groups ...Group) (interface{}, error)

Types

type Group

type Group interface {
	Do(key string, fn func() (interface{}, error)) (interface{}, error)
	LockDuring(fn func())
	Lock()
	Unlock()
}

func NewGroup added in v0.1.2

func NewGroup() Group

Jump to

Keyboard shortcuts

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