dataloader

package
v0.0.0-...-a423d60 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandlerAPIDef

func HandlerAPIDef(fetchFunc func(keys []ParamAPIDef) ([]*graphql.APIDefinitionPage, []error), maxBatch int, wait time.Duration) func(next http.Handler) http.Handler

HandlerAPIDef missing godoc

func HandlerAssignmentOperation

func HandlerAssignmentOperation(fetchFunc func(keys []ParamAssignmentOperation) ([]*graphql.AssignmentOperationPage, []error), maxBatch int, wait time.Duration) func(next http.Handler) http.Handler

HandlerAssignmentOperation missing godoc

func HandlerBundle

func HandlerBundle(fetchFunc func(keys []ParamBundle) ([]*graphql.BundlePage, []error), maxBatch int, wait time.Duration) func(next http.Handler) http.Handler

HandlerBundle missing godoc

func HandlerDocument

func HandlerDocument(fetchFunc func(keys []ParamDocument) ([]*graphql.DocumentPage, []error), maxBatch int, wait time.Duration) func(next http.Handler) http.Handler

HandlerDocument missing godoc

func HandlerEventDef

func HandlerEventDef(fetchFunc func(keys []ParamEventDef) ([]*graphql.EventDefinitionPage, []error), maxBatch int, wait time.Duration) func(next http.Handler) http.Handler

HandlerEventDef missing godoc

func HandlerFetchRequestAPIDef

func HandlerFetchRequestAPIDef(fetchFunc func(keys []ParamFetchRequestAPIDef) ([]*graphql.FetchRequest, []error), maxBatch int, wait time.Duration) func(next http.Handler) http.Handler

HandlerFetchRequestAPIDef missing godoc

func HandlerFetchRequestDocument

func HandlerFetchRequestDocument(fetchFunc func(keys []ParamFetchRequestDocument) ([]*graphql.FetchRequest, []error), maxBatch int, wait time.Duration) func(next http.Handler) http.Handler

HandlerFetchRequestDocument missing godoc

func HandlerFetchRequestEventDef

func HandlerFetchRequestEventDef(fetchFunc func(keys []ParamFetchRequestEventDef) ([]*graphql.FetchRequest, []error), maxBatch int, wait time.Duration) func(next http.Handler) http.Handler

HandlerFetchRequestEventDef missing godoc

func HandlerFormationAssignment

func HandlerFormationAssignment(fetchFunc func(keys []ParamFormationAssignment) ([]*graphql.FormationAssignmentPage, []error), maxBatch int, wait time.Duration) func(next http.Handler) http.Handler

HandlerFormationAssignment missing godoc

func HandlerFormationConstraint

func HandlerFormationConstraint(fetchFunc func(keys []ParamFormationConstraint) ([][]*graphql.FormationConstraint, []error), maxBatch int, wait time.Duration) func(next http.Handler) http.Handler

HandlerFormationConstraint missing godoc

func HandlerFormationParticipant

func HandlerFormationParticipant(fetchFunc func(keys []ParamFormationParticipant) ([]graphql.FormationParticipant, []error), maxBatch int, wait time.Duration) func(next http.Handler) http.Handler

HandlerFormationParticipant prepares the parameters for the dataloader

func HandlerFormationStatus

func HandlerFormationStatus(fetchFunc func(keys []ParamFormationStatus) ([]*graphql.FormationStatus, []error), maxBatch int, wait time.Duration) func(next http.Handler) http.Handler

HandlerFormationStatus missing godoc

func HandlerIntegrationDependency

func HandlerIntegrationDependency(fetchFunc func(keys []ParamIntegrationDependency) ([]*graphql.IntegrationDependencyPage, []error), maxBatch int, wait time.Duration) func(next http.Handler) http.Handler

HandlerIntegrationDependency missing godoc

func HandlerRuntimeContext

func HandlerRuntimeContext(fetchFunc func(keys []ParamRuntimeContext) ([]*graphql.RuntimeContextPage, []error), maxBatch int, wait time.Duration) func(next http.Handler) http.Handler

HandlerRuntimeContext missing godoc

Types

type APIDefLoader

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

APIDefLoader batches and caches requests

func NewAPIDefLoader

func NewAPIDefLoader(config APIDefLoaderConfig) *APIDefLoader

NewAPIDefLoader creates a new APIDefLoader given a fetch, wait, and maxBatch

func (*APIDefLoader) Clear

func (l *APIDefLoader) Clear(key ParamAPIDef)

Clear the value at key from the cache, if it exists

func (*APIDefLoader) Load

Load a APIDefinitionPage by key, batching and caching will be applied automatically

func (*APIDefLoader) LoadAll

func (l *APIDefLoader) LoadAll(keys []ParamAPIDef) ([]*graphql.APIDefinitionPage, []error)

LoadAll fetches many keys at once. It will be broken into appropriate sized sub batches depending on how the loader is configured

func (*APIDefLoader) LoadAllThunk

func (l *APIDefLoader) LoadAllThunk(keys []ParamAPIDef) func() ([]*graphql.APIDefinitionPage, []error)

LoadAllThunk returns a function that when called will block waiting for a APIDefinitionPages. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*APIDefLoader) LoadThunk

func (l *APIDefLoader) LoadThunk(key ParamAPIDef) func() (*graphql.APIDefinitionPage, error)

LoadThunk returns a function that when called will block waiting for a APIDefinitionPage. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*APIDefLoader) Prime

func (l *APIDefLoader) Prime(key ParamAPIDef, value *graphql.APIDefinitionPage) bool

Prime the cache with the provided key and value. If the key already exists, no change is made and false is returned. (To forcefully prime the cache, clear the key first with loader.clear(key).prime(key, value).)

type APIDefLoaderConfig

type APIDefLoaderConfig struct {
	// Fetch is a method that provides the data for the loader
	Fetch func(keys []ParamAPIDef) ([]*graphql.APIDefinitionPage, []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
}

APIDefLoaderConfig captures the config to create a new APIDefLoader

type APIDefLoaders

type APIDefLoaders struct {
	APIDefByID APIDefLoader
}

APIDefLoaders missing godoc

func APIDefFor

func APIDefFor(ctx context.Context) *APIDefLoaders

APIDefFor missing godoc

type AssignmentOperationLoader

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

AssignmentOperationLoader batches and caches requests

func NewAssignmentOperationLoader

func NewAssignmentOperationLoader(config AssignmentOperationLoaderConfig) *AssignmentOperationLoader

NewAssignmentOperationLoader creates a new AssignmentOperationLoader given a fetch, wait, and maxBatch

func (*AssignmentOperationLoader) Clear

Clear the value at key from the cache, if it exists

func (*AssignmentOperationLoader) Load

Load a AssignmentOperationPage by key, batching and caching will be applied automatically

func (*AssignmentOperationLoader) LoadAll

LoadAll fetches many keys at once. It will be broken into appropriate sized sub batches depending on how the loader is configured

func (*AssignmentOperationLoader) LoadAllThunk

LoadAllThunk returns a function that when called will block waiting for a AssignmentOperationPages. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*AssignmentOperationLoader) LoadThunk

LoadThunk returns a function that when called will block waiting for a AssignmentOperationPage. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*AssignmentOperationLoader) Prime

Prime the cache with the provided key and value. If the key already exists, no change is made and false is returned. (To forcefully prime the cache, clear the key first with loader.clear(key).prime(key, value).)

type AssignmentOperationLoaderConfig

type AssignmentOperationLoaderConfig struct {
	// Fetch is a method that provides the data for the loader
	Fetch func(keys []ParamAssignmentOperation) ([]*graphql.AssignmentOperationPage, []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
}

AssignmentOperationLoaderConfig captures the config to create a new AssignmentOperationLoader

type AssignmentOperationLoaders

type AssignmentOperationLoaders struct {
	AssignmentOperationByID AssignmentOperationLoader
}

AssignmentOperationLoaders missing godoc

func FormationAssignmentFor

func FormationAssignmentFor(ctx context.Context) *AssignmentOperationLoaders

FormationAssignmentFor missing godoc

type BundleLoader

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

BundleLoader batches and caches requests

func NewBundleLoader

func NewBundleLoader(config BundleLoaderConfig) *BundleLoader

NewBundleLoader creates a new BundleLoader given a fetch, wait, and maxBatch

func (*BundleLoader) Clear

func (l *BundleLoader) Clear(key ParamBundle)

Clear the value at key from the cache, if it exists

func (*BundleLoader) Load

func (l *BundleLoader) Load(key ParamBundle) (*graphql.BundlePage, error)

Load a BundlePage by key, batching and caching will be applied automatically

func (*BundleLoader) LoadAll

func (l *BundleLoader) LoadAll(keys []ParamBundle) ([]*graphql.BundlePage, []error)

LoadAll fetches many keys at once. It will be broken into appropriate sized sub batches depending on how the loader is configured

func (*BundleLoader) LoadAllThunk

func (l *BundleLoader) LoadAllThunk(keys []ParamBundle) func() ([]*graphql.BundlePage, []error)

LoadAllThunk returns a function that when called will block waiting for a BundlePages. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*BundleLoader) LoadThunk

func (l *BundleLoader) LoadThunk(key ParamBundle) func() (*graphql.BundlePage, error)

LoadThunk returns a function that when called will block waiting for a BundlePage. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*BundleLoader) Prime

func (l *BundleLoader) Prime(key ParamBundle, value *graphql.BundlePage) bool

Prime the cache with the provided key and value. If the key already exists, no change is made and false is returned. (To forcefully prime the cache, clear the key first with loader.clear(key).prime(key, value).)

type BundleLoaderConfig

type BundleLoaderConfig struct {
	// Fetch is a method that provides the data for the loader
	Fetch func(keys []ParamBundle) ([]*graphql.BundlePage, []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
}

BundleLoaderConfig captures the config to create a new BundleLoader

type BundleLoaders

type BundleLoaders struct {
	BundleByID BundleLoader
}

BundleLoaders missing godoc

func BundleFor

func BundleFor(ctx context.Context) *BundleLoaders

BundleFor missing godoc

type DocumentLoader

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

DocumentLoader batches and caches requests

func NewDocumentLoader

func NewDocumentLoader(config DocumentLoaderConfig) *DocumentLoader

NewDocumentLoader creates a new DocumentLoader given a fetch, wait, and maxBatch

func (*DocumentLoader) Clear

func (l *DocumentLoader) Clear(key ParamDocument)

Clear the value at key from the cache, if it exists

func (*DocumentLoader) Load

Load a DocumentPage by key, batching and caching will be applied automatically

func (*DocumentLoader) LoadAll

func (l *DocumentLoader) LoadAll(keys []ParamDocument) ([]*graphql.DocumentPage, []error)

LoadAll fetches many keys at once. It will be broken into appropriate sized sub batches depending on how the loader is configured

func (*DocumentLoader) LoadAllThunk

func (l *DocumentLoader) LoadAllThunk(keys []ParamDocument) func() ([]*graphql.DocumentPage, []error)

LoadAllThunk returns a function that when called will block waiting for a DocumentPages. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*DocumentLoader) LoadThunk

func (l *DocumentLoader) LoadThunk(key ParamDocument) func() (*graphql.DocumentPage, error)

LoadThunk returns a function that when called will block waiting for a DocumentPage. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*DocumentLoader) Prime

func (l *DocumentLoader) Prime(key ParamDocument, value *graphql.DocumentPage) bool

Prime the cache with the provided key and value. If the key already exists, no change is made and false is returned. (To forcefully prime the cache, clear the key first with loader.clear(key).prime(key, value).)

type DocumentLoaderConfig

type DocumentLoaderConfig struct {
	// Fetch is a method that provides the data for the loader
	Fetch func(keys []ParamDocument) ([]*graphql.DocumentPage, []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
}

DocumentLoaderConfig captures the config to create a new DocumentLoader

type DocumentLoaders

type DocumentLoaders struct {
	DocumentByID DocumentLoader
}

DocumentLoaders missing godoc

func DocumentFor

func DocumentFor(ctx context.Context) *DocumentLoaders

DocumentFor missing godoc

type EventDefLoader

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

EventDefLoader batches and caches requests

func NewEventDefLoader

func NewEventDefLoader(config EventDefLoaderConfig) *EventDefLoader

NewEventDefLoader creates a new EventDefLoader given a fetch, wait, and maxBatch

func (*EventDefLoader) Clear

func (l *EventDefLoader) Clear(key ParamEventDef)

Clear the value at key from the cache, if it exists

func (*EventDefLoader) Load

Load a EventDefinitionPage by key, batching and caching will be applied automatically

func (*EventDefLoader) LoadAll

func (l *EventDefLoader) LoadAll(keys []ParamEventDef) ([]*graphql.EventDefinitionPage, []error)

LoadAll fetches many keys at once. It will be broken into appropriate sized sub batches depending on how the loader is configured

func (*EventDefLoader) LoadAllThunk

func (l *EventDefLoader) LoadAllThunk(keys []ParamEventDef) func() ([]*graphql.EventDefinitionPage, []error)

LoadAllThunk returns a function that when called will block waiting for a EventDefinitionPages. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*EventDefLoader) LoadThunk

func (l *EventDefLoader) LoadThunk(key ParamEventDef) func() (*graphql.EventDefinitionPage, error)

LoadThunk returns a function that when called will block waiting for a EventDefinitionPage. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*EventDefLoader) Prime

Prime the cache with the provided key and value. If the key already exists, no change is made and false is returned. (To forcefully prime the cache, clear the key first with loader.clear(key).prime(key, value).)

type EventDefLoaderConfig

type EventDefLoaderConfig struct {
	// Fetch is a method that provides the data for the loader
	Fetch func(keys []ParamEventDef) ([]*graphql.EventDefinitionPage, []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
}

EventDefLoaderConfig captures the config to create a new EventDefLoader

type EventDefLoaders

type EventDefLoaders struct {
	EventDefByID EventDefLoader
}

EventDefLoaders missing godoc

func EventDefFor

func EventDefFor(ctx context.Context) *EventDefLoaders

EventDefFor missing godoc

type FetchRequestAPIDefLoader

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

FetchRequestAPIDefLoader batches and caches requests

func NewFetchRequestAPIDefLoader

func NewFetchRequestAPIDefLoader(config FetchRequestAPIDefLoaderConfig) *FetchRequestAPIDefLoader

NewFetchRequestAPIDefLoader creates a new FetchRequestAPIDefLoader given a fetch, wait, and maxBatch

func (*FetchRequestAPIDefLoader) Clear

Clear the value at key from the cache, if it exists

func (*FetchRequestAPIDefLoader) Load

Load a FetchRequest by key, batching and caching will be applied automatically

func (*FetchRequestAPIDefLoader) LoadAll

LoadAll fetches many keys at once. It will be broken into appropriate sized sub batches depending on how the loader is configured

func (*FetchRequestAPIDefLoader) LoadAllThunk

func (l *FetchRequestAPIDefLoader) LoadAllThunk(keys []ParamFetchRequestAPIDef) func() ([]*graphql.FetchRequest, []error)

LoadAllThunk returns a function that when called will block waiting for a FetchRequests. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*FetchRequestAPIDefLoader) LoadThunk

LoadThunk returns a function that when called will block waiting for a FetchRequest. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*FetchRequestAPIDefLoader) Prime

Prime the cache with the provided key and value. If the key already exists, no change is made and false is returned. (To forcefully prime the cache, clear the key first with loader.clear(key).prime(key, value).)

type FetchRequestAPIDefLoaderConfig

type FetchRequestAPIDefLoaderConfig struct {
	// Fetch is a method that provides the data for the loader
	Fetch func(keys []ParamFetchRequestAPIDef) ([]*graphql.FetchRequest, []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
}

FetchRequestAPIDefLoaderConfig captures the config to create a new FetchRequestAPIDefLoader

type FetchRequestDocumentLoader

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

FetchRequestDocumentLoader batches and caches requests

func NewFetchRequestDocumentLoader

func NewFetchRequestDocumentLoader(config FetchRequestDocumentLoaderConfig) *FetchRequestDocumentLoader

NewFetchRequestDocumentLoader creates a new FetchRequestDocumentLoader given a fetch, wait, and maxBatch

func (*FetchRequestDocumentLoader) Clear

Clear the value at key from the cache, if it exists

func (*FetchRequestDocumentLoader) Load

Load a FetchRequest by key, batching and caching will be applied automatically

func (*FetchRequestDocumentLoader) LoadAll

LoadAll fetches many keys at once. It will be broken into appropriate sized sub batches depending on how the loader is configured

func (*FetchRequestDocumentLoader) LoadAllThunk

func (l *FetchRequestDocumentLoader) LoadAllThunk(keys []ParamFetchRequestDocument) func() ([]*graphql.FetchRequest, []error)

LoadAllThunk returns a function that when called will block waiting for a FetchRequests. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*FetchRequestDocumentLoader) LoadThunk

LoadThunk returns a function that when called will block waiting for a FetchRequest. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*FetchRequestDocumentLoader) Prime

Prime the cache with the provided key and value. If the key already exists, no change is made and false is returned. (To forcefully prime the cache, clear the key first with loader.clear(key).prime(key, value).)

type FetchRequestDocumentLoaderConfig

type FetchRequestDocumentLoaderConfig struct {
	// Fetch is a method that provides the data for the loader
	Fetch func(keys []ParamFetchRequestDocument) ([]*graphql.FetchRequest, []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
}

FetchRequestDocumentLoaderConfig captures the config to create a new FetchRequestDocumentLoader

type FetchRequestEventDefLoader

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

FetchRequestEventDefLoader batches and caches requests

func NewFetchRequestEventDefLoader

func NewFetchRequestEventDefLoader(config FetchRequestEventDefLoaderConfig) *FetchRequestEventDefLoader

NewFetchRequestEventDefLoader creates a new FetchRequestEventDefLoader given a fetch, wait, and maxBatch

func (*FetchRequestEventDefLoader) Clear

Clear the value at key from the cache, if it exists

func (*FetchRequestEventDefLoader) Load

Load a FetchRequest by key, batching and caching will be applied automatically

func (*FetchRequestEventDefLoader) LoadAll

LoadAll fetches many keys at once. It will be broken into appropriate sized sub batches depending on how the loader is configured

func (*FetchRequestEventDefLoader) LoadAllThunk

func (l *FetchRequestEventDefLoader) LoadAllThunk(keys []ParamFetchRequestEventDef) func() ([]*graphql.FetchRequest, []error)

LoadAllThunk returns a function that when called will block waiting for a FetchRequests. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*FetchRequestEventDefLoader) LoadThunk

LoadThunk returns a function that when called will block waiting for a FetchRequest. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*FetchRequestEventDefLoader) Prime

Prime the cache with the provided key and value. If the key already exists, no change is made and false is returned. (To forcefully prime the cache, clear the key first with loader.clear(key).prime(key, value).)

type FetchRequestEventDefLoaderConfig

type FetchRequestEventDefLoaderConfig struct {
	// Fetch is a method that provides the data for the loader
	Fetch func(keys []ParamFetchRequestEventDef) ([]*graphql.FetchRequest, []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
}

FetchRequestEventDefLoaderConfig captures the config to create a new FetchRequestEventDefLoader

type FormationAssignmentLoader

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

FormationAssignmentLoader batches and caches requests

func NewFormationAssignmentLoader

func NewFormationAssignmentLoader(config FormationAssignmentLoaderConfig) *FormationAssignmentLoader

NewFormationAssignmentLoader creates a new FormationAssignmentLoader given a fetch, wait, and maxBatch

func (*FormationAssignmentLoader) Clear

Clear the value at key from the cache, if it exists

func (*FormationAssignmentLoader) Load

Load a FormationAssignmentPage by key, batching and caching will be applied automatically

func (*FormationAssignmentLoader) LoadAll

LoadAll fetches many keys at once. It will be broken into appropriate sized sub batches depending on how the loader is configured

func (*FormationAssignmentLoader) LoadAllThunk

LoadAllThunk returns a function that when called will block waiting for a FormationAssignmentPages. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*FormationAssignmentLoader) LoadThunk

LoadThunk returns a function that when called will block waiting for a FormationAssignmentPage. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*FormationAssignmentLoader) Prime

Prime the cache with the provided key and value. If the key already exists, no change is made and false is returned. (To forcefully prime the cache, clear the key first with loader.clear(key).prime(key, value).)

type FormationAssignmentLoaderConfig

type FormationAssignmentLoaderConfig struct {
	// Fetch is a method that provides the data for the loader
	Fetch func(keys []ParamFormationAssignment) ([]*graphql.FormationAssignmentPage, []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
}

FormationAssignmentLoaderConfig captures the config to create a new FormationAssignmentLoader

type FormationAssignmentLoaders

type FormationAssignmentLoaders struct {
	FormationAssignmentByID FormationAssignmentLoader
}

FormationAssignmentLoaders missing godoc

func FormationFor

func FormationFor(ctx context.Context) *FormationAssignmentLoaders

FormationFor missing godoc

type FormationConstraintLoader

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

FormationConstraintLoader batches and caches requests

func NewFormationConstraintLoader

func NewFormationConstraintLoader(config FormationConstraintLoaderConfig) *FormationConstraintLoader

NewFormationConstraintLoader creates a new FormationConstraintLoader given a fetch, wait, and maxBatch

func (*FormationConstraintLoader) Clear

Clear the value at key from the cache, if it exists

func (*FormationConstraintLoader) Load

Load a FormationConstraint by key, batching and caching will be applied automatically

func (*FormationConstraintLoader) LoadAll

LoadAll fetches many keys at once. It will be broken into appropriate sized sub batches depending on how the loader is configured

func (*FormationConstraintLoader) LoadAllThunk

func (l *FormationConstraintLoader) LoadAllThunk(keys []ParamFormationConstraint) func() ([][]*graphql.FormationConstraint, []error)

LoadAllThunk returns a function that when called will block waiting for a FormationConstraints. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*FormationConstraintLoader) LoadThunk

LoadThunk returns a function that when called will block waiting for a FormationConstraint. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*FormationConstraintLoader) Prime

Prime the cache with the provided key and value. If the key already exists, no change is made and false is returned. (To forcefully prime the cache, clear the key first with loader.clear(key).prime(key, value).)

type FormationConstraintLoaderConfig

type FormationConstraintLoaderConfig struct {
	// Fetch is a method that provides the data for the loader
	Fetch func(keys []ParamFormationConstraint) ([][]*graphql.FormationConstraint, []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
}

FormationConstraintLoaderConfig captures the config to create a new FormationConstraintLoader

type FormationConstraintLoaders

type FormationConstraintLoaders struct {
	FormationConstraintByID FormationConstraintLoader
}

FormationConstraintLoaders missing godoc

func FormationTemplateFor

func FormationTemplateFor(ctx context.Context) *FormationConstraintLoaders

FormationTemplateFor missing godoc

type FormationParticipantDataloader

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

FormationParticipantDataloader batches and caches requests

func NewFormationParticipantDataloader

func NewFormationParticipantDataloader(config FormationParticipantDataloaderConfig) *FormationParticipantDataloader

NewFormationParticipantDataloader creates a new FormationParticipantDataloader given a fetch, wait, and maxBatch

func (*FormationParticipantDataloader) Clear

Clear the value at key from the cache, if it exists

func (*FormationParticipantDataloader) Load

Load a FormationParticipant by key, batching and caching will be applied automatically

func (*FormationParticipantDataloader) LoadAll

LoadAll fetches many keys at once. It will be broken into appropriate sized sub batches depending on how the loader is configured

func (*FormationParticipantDataloader) LoadAllThunk

LoadAllThunk returns a function that when called will block waiting for a FormationParticipants. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*FormationParticipantDataloader) LoadThunk

LoadThunk returns a function that when called will block waiting for a FormationParticipant. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*FormationParticipantDataloader) Prime

Prime the cache with the provided key and value. If the key already exists, no change is made and false is returned. (To forcefully prime the cache, clear the key first with loader.clear(key).prime(key, value).)

type FormationParticipantDataloaderConfig

type FormationParticipantDataloaderConfig struct {
	// Fetch is a method that provides the data for the loader
	Fetch func(keys []ParamFormationParticipant) ([]graphql.FormationParticipant, []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
}

FormationParticipantDataloaderConfig captures the config to create a new FormationParticipantDataloader

type FormationStatusLoader

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

FormationStatusLoader batches and caches requests

func NewFormationStatusLoader

func NewFormationStatusLoader(config FormationStatusLoaderConfig) *FormationStatusLoader

NewFormationStatusLoader creates a new FormationStatusLoader given a fetch, wait, and maxBatch

func (*FormationStatusLoader) Clear

Clear the value at key from the cache, if it exists

func (*FormationStatusLoader) Load

Load a FormationStatus by key, batching and caching will be applied automatically

func (*FormationStatusLoader) LoadAll

LoadAll fetches many keys at once. It will be broken into appropriate sized sub batches depending on how the loader is configured

func (*FormationStatusLoader) LoadAllThunk

func (l *FormationStatusLoader) LoadAllThunk(keys []ParamFormationStatus) func() ([]*graphql.FormationStatus, []error)

LoadAllThunk returns a function that when called will block waiting for a FormationStatuss. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*FormationStatusLoader) LoadThunk

LoadThunk returns a function that when called will block waiting for a FormationStatus. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*FormationStatusLoader) Prime

Prime the cache with the provided key and value. If the key already exists, no change is made and false is returned. (To forcefully prime the cache, clear the key first with loader.clear(key).prime(key, value).)

type FormationStatusLoaderConfig

type FormationStatusLoaderConfig struct {
	// Fetch is a method that provides the data for the loader
	Fetch func(keys []ParamFormationStatus) ([]*graphql.FormationStatus, []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
}

FormationStatusLoaderConfig captures the config to create a new FormationStatusLoader

type FormationStatusLoaders

type FormationStatusLoaders struct {
	FormationStatusByID FormationStatusLoader
}

FormationStatusLoaders missing godoc

func FormationStatusFor

func FormationStatusFor(ctx context.Context) *FormationStatusLoaders

FormationStatusFor missing godoc

type IntegrationDependencyLoader

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

IntegrationDependencyLoader batches and caches requests

func NewIntegrationDependencyLoader

func NewIntegrationDependencyLoader(config IntegrationDependencyLoaderConfig) *IntegrationDependencyLoader

NewIntegrationDependencyLoader creates a new IntegrationDependencyLoader given a fetch, wait, and maxBatch

func (*IntegrationDependencyLoader) Clear

Clear the value at key from the cache, if it exists

func (*IntegrationDependencyLoader) Load

Load a IntegrationDependencyPage by key, batching and caching will be applied automatically

func (*IntegrationDependencyLoader) LoadAll

LoadAll fetches many keys at once. It will be broken into appropriate sized sub batches depending on how the loader is configured

func (*IntegrationDependencyLoader) LoadAllThunk

LoadAllThunk returns a function that when called will block waiting for a IntegrationDependencyPages. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*IntegrationDependencyLoader) LoadThunk

LoadThunk returns a function that when called will block waiting for a IntegrationDependencyPage. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*IntegrationDependencyLoader) Prime

Prime the cache with the provided key and value. If the key already exists, no change is made and false is returned. (To forcefully prime the cache, clear the key first with loader.clear(key).prime(key, value).)

type IntegrationDependencyLoaderConfig

type IntegrationDependencyLoaderConfig struct {
	// Fetch is a method that provides the data for the loader
	Fetch func(keys []ParamIntegrationDependency) ([]*graphql.IntegrationDependencyPage, []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
}

IntegrationDependencyLoaderConfig captures the config to create a new IntegrationDependencyLoader

type IntegrationDependencyLoaders

type IntegrationDependencyLoaders struct {
	IntegrationDependencyByID IntegrationDependencyLoader
}

IntegrationDependencyLoaders missing godoc

func IntegrationDependencyFor

func IntegrationDependencyFor(ctx context.Context) *IntegrationDependencyLoaders

IntegrationDependencyFor missing godoc

type LoadersFetchRequestAPIDef

type LoadersFetchRequestAPIDef struct {
	FetchRequestAPIDefByID FetchRequestAPIDefLoader
}

LoadersFetchRequestAPIDef missing godoc

func ForFetchRequestAPIDef

func ForFetchRequestAPIDef(ctx context.Context) *LoadersFetchRequestAPIDef

ForFetchRequestAPIDef missing godoc

type LoadersFetchRequestDocument

type LoadersFetchRequestDocument struct {
	FetchRequestDocumentByID FetchRequestDocumentLoader
}

LoadersFetchRequestDocument missing godoc

func ForFetchRequestDocument

func ForFetchRequestDocument(ctx context.Context) *LoadersFetchRequestDocument

ForFetchRequestDocument missing godoc

type LoadersFetchRequestEventDef

type LoadersFetchRequestEventDef struct {
	FetchRequestEventDefByID FetchRequestEventDefLoader
}

LoadersFetchRequestEventDef missing godoc

func ForFetchRequestEventDef

func ForFetchRequestEventDef(ctx context.Context) *LoadersFetchRequestEventDef

ForFetchRequestEventDef missing godoc

type LoadersFormationParticipant

type LoadersFormationParticipant struct {
	FormationParticipantDataloader FormationParticipantDataloader
}

LoadersFormationParticipant is a dataloader for formation participants

func ForSourceFormationParticipant

func ForSourceFormationParticipant(ctx context.Context) *LoadersFormationParticipant

ForSourceFormationParticipant retrieves the dataloader for formation assignment sources from the context

func ForTargetFormationParticipant

func ForTargetFormationParticipant(ctx context.Context) *LoadersFormationParticipant

ForTargetFormationParticipant retrieves the dataloader for formation assignment targets from the context

type ParamAPIDef

type ParamAPIDef struct {
	ID    string
	Ctx   context.Context
	First *int
	After *graphql.PageCursor
}

ParamAPIDef missing godoc

type ParamAssignmentOperation

type ParamAssignmentOperation struct {
	ID    string
	First *int
	After *graphql.PageCursor
	Ctx   context.Context
}

ParamAssignmentOperation missing godoc

type ParamBundle

type ParamBundle struct {
	ID    string
	First *int
	After *graphql.PageCursor
	Ctx   context.Context
}

ParamBundle missing godoc

type ParamDocument

type ParamDocument struct {
	ID    string
	First *int
	After *graphql.PageCursor
	Ctx   context.Context
}

ParamDocument missing godoc

type ParamEventDef

type ParamEventDef struct {
	ID    string
	First *int
	After *graphql.PageCursor
	Ctx   context.Context
}

ParamEventDef missing godoc

type ParamFetchRequestAPIDef

type ParamFetchRequestAPIDef struct {
	ID  string
	Ctx context.Context
}

ParamFetchRequestAPIDef missing godoc

type ParamFetchRequestDocument

type ParamFetchRequestDocument struct {
	ID  string
	Ctx context.Context
}

ParamFetchRequestDocument missing godoc

type ParamFetchRequestEventDef

type ParamFetchRequestEventDef struct {
	ID  string
	Ctx context.Context
}

ParamFetchRequestEventDef missing godoc

type ParamFormationAssignment

type ParamFormationAssignment struct {
	ID     string
	First  *int
	After  *graphql.PageCursor
	Ctx    context.Context
	Tenant string
}

ParamFormationAssignment missing godoc

type ParamFormationConstraint

type ParamFormationConstraint struct {
	ID  string
	Ctx context.Context
}

ParamFormationConstraint missing godoc

type ParamFormationParticipant

type ParamFormationParticipant struct {
	ID              string
	ParticipantID   string
	ParticipantType string
	Ctx             context.Context
}

ParamFormationParticipant are parameters for the formation participant dataloader

type ParamFormationStatus

type ParamFormationStatus struct {
	ID        string
	State     string
	Message   string
	ErrorCode int
	Ctx       context.Context
	Tenant    string
}

ParamFormationStatus missing godoc

type ParamIntegrationDependency

type ParamIntegrationDependency struct {
	ID    string
	First *int
	After *graphql.PageCursor
	Ctx   context.Context
}

ParamIntegrationDependency missing godoc

type ParamRuntimeContext

type ParamRuntimeContext struct {
	ID    string
	First *int
	After *graphql.PageCursor
	Ctx   context.Context
}

ParamRuntimeContext missing godoc

type RuntimeContextLoader

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

RuntimeContextLoader batches and caches requests

func NewRuntimeContextLoader

func NewRuntimeContextLoader(config RuntimeContextLoaderConfig) *RuntimeContextLoader

NewRuntimeContextLoader creates a new RuntimeContextLoader given a fetch, wait, and maxBatch

func (*RuntimeContextLoader) Clear

Clear the value at key from the cache, if it exists

func (*RuntimeContextLoader) Load

Load a RuntimeContextPage by key, batching and caching will be applied automatically

func (*RuntimeContextLoader) LoadAll

LoadAll fetches many keys at once. It will be broken into appropriate sized sub batches depending on how the loader is configured

func (*RuntimeContextLoader) LoadAllThunk

func (l *RuntimeContextLoader) LoadAllThunk(keys []ParamRuntimeContext) func() ([]*graphql.RuntimeContextPage, []error)

LoadAllThunk returns a function that when called will block waiting for a RuntimeContextPages. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*RuntimeContextLoader) LoadThunk

LoadThunk returns a function that when called will block waiting for a RuntimeContextPage. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*RuntimeContextLoader) Prime

Prime the cache with the provided key and value. If the key already exists, no change is made and false is returned. (To forcefully prime the cache, clear the key first with loader.clear(key).prime(key, value).)

type RuntimeContextLoaderConfig

type RuntimeContextLoaderConfig struct {
	// Fetch is a method that provides the data for the loader
	Fetch func(keys []ParamRuntimeContext) ([]*graphql.RuntimeContextPage, []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
}

RuntimeContextLoaderConfig captures the config to create a new RuntimeContextLoader

type RuntimeContextLoaders

type RuntimeContextLoaders struct {
	RuntimeContextByID RuntimeContextLoader
}

RuntimeContextLoaders missing godoc

func RuntimeContextFor

func RuntimeContextFor(ctx context.Context) *RuntimeContextLoaders

RuntimeContextFor missing godoc

Jump to

Keyboard shortcuts

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