Created
January 20, 2020 16:03
-
-
Save fwojciec/17ae108ae04bce1af6d7697dcdbf675e to your computer and use it in GitHub Desktop.
gqlserver2: dataloaders8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// AgentLoaderConfig captures the config to create a new AgentLoader | |
type AgentLoaderConfig struct { | |
// Fetch is a method that provides the data for the loader | |
Fetch func(keys []int64) ([]*pg.Agent, []error) | |
// Wait is how long wait before sending a batch | |
Wait time.Duration | |
// MaxBatch will limit the maximum number of keys to send in one batch, 0 = not limit | |
MaxBatch int | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment