dataloader

package
v1.0.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewContext

func NewContext(ctx context.Context) context.Context

returns a new context to use for the dataloader cache

Types

type ContextCache

type ContextCache struct {
	// contains filtered or unexported fields
}

ContextCache is a dataloader.Cache implementation that removes cache entries after the context is done.

func NewContextCache

func NewContextCache(logger *zap.Logger) *ContextCache

func (*ContextCache) Clear

func (c *ContextCache) Clear()

func (*ContextCache) Delete

func (c *ContextCache) Delete(ctx context.Context, key dataloader.Key) bool

func (*ContextCache) Get

func (*ContextCache) Set

func (c *ContextCache) Set(ctx context.Context, key dataloader.Key, thunk dataloader.Thunk)

Jump to

Keyboard shortcuts

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