loader

package
v1.7.2-beta0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidType = errors.New("invalid type")

ErrInvalidType indicates that results loaded is not the type expected

Functions

func GetChainByID

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

GetChainByID fetches the chain by it's id.

func GetEthTxAttemptsByEthTxID added in v1.2.0

func GetEthTxAttemptsByEthTxID(ctx context.Context, id string) ([]txmgr.EthTxAttempt, error)

GetEthTxAttemptsByEthTxID fetches the attempts for an eth transaction.

func GetFeedsManagerByID

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

GetFeedsManagerByID fetches the feed manager by ID.

func GetFeedsManagerChainConfigsByManagerID added in v1.5.0

func GetFeedsManagerChainConfigsByManagerID(ctx context.Context, mgrID int64) ([]feeds.ChainConfig, error)

func GetJobByExternalJobID added in v1.3.0

func GetJobByExternalJobID(ctx context.Context, id string) (*job.Job, error)

GetJobByExternalJobID fetches the job proposals by external job ID

func GetJobByPipelineSpecID added in v1.2.0

func GetJobByPipelineSpecID(ctx context.Context, id string) (*job.Job, error)

GetJobByPipelineSpecID fetches the job by pipeline spec ID.

func GetJobProposalsByFeedsManagerID

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

GetJobProposalsByFeedsManagerID fetches the job proposals by feeds manager ID.

func GetJobRunsByIDs added in v1.2.0

func GetJobRunsByIDs(ctx context.Context, ids []int64) ([]pipeline.Run, error)

GetJobRunsByIDs fetches the job runs by their ID.

func GetJobSpecErrorsByJobID added in v1.5.0

func GetJobSpecErrorsByJobID(ctx context.Context, jobID int32) ([]job.SpecError, error)

GetJobSpecErrorsByJobID fetches the Spec Errors for a Job.

func GetLatestSpecByJobProposalID added in v1.2.0

func GetLatestSpecByJobProposalID(ctx context.Context, jpID string) (*feeds.JobProposalSpec, error)

GetLatestSpecByJobProposalID fetches the latest spec for a job proposal id.

func GetNodesByChainID

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

GetNodesByChainID fetches the nodes for a chain.

func GetSpecsByJobProposalID added in v1.2.0

func GetSpecsByJobProposalID(ctx context.Context, jpID string) ([]feeds.JobProposalSpec, error)

GetSpecsByJobProposalID fetches the spec for a job proposal id.

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 {
	ChainsByIDLoader                          *dataloader.Loader
	EthTxAttemptsByEthTxIDLoader              *dataloader.Loader
	FeedsManagersByIDLoader                   *dataloader.Loader
	FeedsManagerChainConfigsByManagerIDLoader *dataloader.Loader
	JobProposalsByManagerIDLoader             *dataloader.Loader
	JobProposalSpecsByJobProposalID           *dataloader.Loader
	JobRunsByIDLoader                         *dataloader.Loader
	JobsByExternalJobIDs                      *dataloader.Loader
	JobsByPipelineSpecIDLoader                *dataloader.Loader
	NodesByChainIDLoader                      *dataloader.Loader
	SpecErrorsByJobIDLoader                   *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