loader

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetChainByID

func GetChainByID(ctx context.Context, id string) (*types.Chain, error)

GetChainByID fetches the chain by it's id.

func GetFeedsManagerByID

func GetFeedsManagerByID(ctx context.Context, id string) (*feeds.FeedsManager, error)

GetFeedsManagerByID fetches the feed manager by ID.

func GetJobProposalsByFeedsManagerID

func GetJobProposalsByFeedsManagerID(ctx context.Context, id string) ([]feeds.JobProposal, error)

GetJobProposalsByFeedsManagerID fetches the job proposals by feeds manager ID.

func GetJobRunsByPipelineSpecID

func GetJobRunsByPipelineSpecID(ctx context.Context, id string) ([]pipeline.Run, error)

GetJobRunsByPipelineSpecID fetches the job runs by pipeline spec ID.

func GetNodesByChainID

func GetNodesByChainID(ctx context.Context, id string) ([]types.Node, error)

GetNodesByChainID fetches the nodes for a chain.

func InjectDataloader

func InjectDataloader(ctx context.Context, app chainlink.Application) context.Context

InjectDataloader injects the dataloader into the context.

func Middleware

func Middleware(app chainlink.Application) gin.HandlerFunc

Middleware injects the dataloader into a gin context.

Types

type Dataloader

type Dataloader struct {
	NodesByChainIDLoader          *dataloader.Loader
	ChainsByIDLoader              *dataloader.Loader
	FeedsManagersByIDLoader       *dataloader.Loader
	JobRunsByPipelineIDLoader     *dataloader.Loader
	JobProposalsByManagerIDLoader *dataloader.Loader
	// contains filtered or unexported fields
}

func For

func For(ctx context.Context) *Dataloader

For returns the dataloader for a given context

func New

Jump to

Keyboard shortcuts

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