standard

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStandardStrategy

func NewStandardStrategy(opts ...Option) dataloader.StrategyFunction

NewStandardStrategy returns a new instance of the standard strategy. The Standard Strategy, calls the batch function once when the keys array reaches capacity then subsequent calls to `Load()` will call the batch function with the individual keys.

Types

type Option added in v0.4.0

type Option func(*options)

Option accepts the dataloader and sets an option on it.

func WithLogger added in v0.5.0

func WithLogger(l log.Logger) Option

WithLogger configures the logger for the strategy. Default is a no op logger.

func WithTimeout added in v0.4.0

func WithTimeout(t time.Duration) Option

WithTimeout sets the timeout value for the strategy

Jump to

Keyboard shortcuts

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