dataloader

package
v0.30.1 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Loader added in v0.30.0

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

func NewStoreLoader added in v0.30.0

func NewStoreLoader[V any](ctx context.Context, fetchMany func(context.Context, []string) ([]V, error)) *Loader[string, V]

func NewStoreLoaderInt added in v0.30.0

func NewStoreLoaderInt[V any](ctx context.Context, fetchMany func(context.Context, []int) ([]V, error)) *Loader[int, V]

func (*Loader[K, V]) Close added in v0.30.0

func (l *Loader[K, V]) Close() error

func (*Loader[K, V]) FetchOne added in v0.30.0

func (l *Loader[K, V]) FetchOne(ctx context.Context, id K) (*V, error)

Jump to

Keyboard shortcuts

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