Documentation ¶
Index ¶
- type Application
- type ApplicationOpts
- type ChainlinkApplication
- func (app *ChainlinkApplication) AddJobV2(ctx context.Context, j job.Job, name null.String) (job.Job, error)
- func (app *ChainlinkApplication) BPTXMORM() bulletprooftxmanager.ORM
- func (app *ChainlinkApplication) BridgeORM() bridges.ORM
- func (app *ChainlinkApplication) DeleteJob(ctx context.Context, jobID int32) error
- func (app *ChainlinkApplication) EVMORM() evmtypes.ORM
- func (app *ChainlinkApplication) GetChainSet() evm.ChainSet
- func (app *ChainlinkApplication) GetConfig() config.GeneralConfig
- func (app *ChainlinkApplication) GetDB() *gorm.DB
- func (app *ChainlinkApplication) GetEventBroadcaster() postgres.EventBroadcaster
- func (app *ChainlinkApplication) GetExternalInitiatorManager() webhook.ExternalInitiatorManager
- func (app *ChainlinkApplication) GetFeedsService() feeds.Service
- func (app *ChainlinkApplication) GetHealthChecker() health.Checker
- func (app *ChainlinkApplication) GetKeyStore() keystore.Master
- func (app *ChainlinkApplication) GetLogger() logger.Logger
- func (app *ChainlinkApplication) GetWebAuthnConfiguration() sessions.WebAuthnConfiguration
- func (app *ChainlinkApplication) JobORM() job.ORM
- func (app *ChainlinkApplication) JobSpawner() job.Spawner
- func (app *ChainlinkApplication) NewBox() packr.Box
- func (app *ChainlinkApplication) PipelineORM() pipeline.ORM
- func (app *ChainlinkApplication) ReplayFromBlock(chainID *big.Int, number uint64) error
- func (app *ChainlinkApplication) ResumeJobV2(ctx context.Context, taskID uuid.UUID, result pipeline.Result) error
- func (app *ChainlinkApplication) RunJobV2(ctx context.Context, jobID int32, meta map[string]interface{}) (int64, error)
- func (app *ChainlinkApplication) RunWebhookJobV2(ctx context.Context, jobUUID uuid.UUID, requestBody string, ...) (int64, error)
- func (app *ChainlinkApplication) SessionORM() sessions.ORM
- func (app *ChainlinkApplication) SetLogLevel(ctx context.Context, lvl zapcore.Level) error
- func (app *ChainlinkApplication) SetServiceLogLevel(ctx context.Context, serviceName string, level zapcore.Level) error
- func (app *ChainlinkApplication) Start() error
- func (app *ChainlinkApplication) Stop() error
- func (app *ChainlinkApplication) StopIfStarted() error
- func (app *ChainlinkApplication) WakeSessionReaper()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application interface { Start() error Stop() error GetLogger() logger.Logger GetHealthChecker() health.Checker GetDB() *gorm.DB GetConfig() config.GeneralConfig SetLogLevel(ctx context.Context, lvl zapcore.Level) error GetKeyStore() keystore.Master GetEventBroadcaster() postgres.EventBroadcaster WakeSessionReaper() NewBox() packr.Box GetWebAuthnConfiguration() sessions.WebAuthnConfiguration GetExternalInitiatorManager() webhook.ExternalInitiatorManager GetChainSet() evm.ChainSet // V2 Jobs (TOML specified) JobSpawner() job.Spawner JobORM() job.ORM EVMORM() evmtypes.ORM PipelineORM() pipeline.ORM BridgeORM() bridges.ORM SessionORM() sessions.ORM BPTXMORM() bulletprooftxmanager.ORM AddJobV2(ctx context.Context, job job.Job, name null.String) (job.Job, error) DeleteJob(ctx context.Context, jobID int32) error RunWebhookJobV2(ctx context.Context, jobUUID uuid.UUID, requestBody string, meta pipeline.JSONSerializable) (int64, error) ResumeJobV2(ctx context.Context, taskID uuid.UUID, result pipeline.Result) error // Testing only RunJobV2(ctx context.Context, jobID int32, meta map[string]interface{}) (int64, error) SetServiceLogLevel(ctx context.Context, service string, level zapcore.Level) error // Feeds GetFeedsService() feeds.Service // ReplayFromBlock of blocks ReplayFromBlock(chainID *big.Int, number uint64) error }
Application implements the common functions used in the core node.
func NewApplication ¶
func NewApplication(opts ApplicationOpts) (Application, error)
NewApplication initializes a new store if one is not already present at the configured root directory (default: ~/.chainlink), the logger at the same directory and returns the Application to be used by the node. TODO: Inject more dependencies here to save booting up useless stuff in tests
type ApplicationOpts ¶ added in v1.10.17
type ApplicationOpts struct { Config config.GeneralConfig EventBroadcaster postgres.EventBroadcaster ShutdownSignal gracefulpanic.Signal GormDB *gorm.DB SqlxDB *sqlx.DB KeyStore keystore.Master ChainSet evm.ChainSet Logger logger.Logger ExternalInitiatorManager webhook.ExternalInitiatorManager Version string AdvisoryLock postgres.Locker }
type ChainlinkApplication ¶
type ChainlinkApplication struct { Exiter func(int) ChainSet evm.ChainSet EventBroadcaster postgres.EventBroadcaster FeedsService feeds.Service Config config.GeneralConfig KeyStore keystore.Master ExternalInitiatorManager webhook.ExternalInitiatorManager SessionReaper utils.SleeperTask HealthChecker health.Checker // contains filtered or unexported fields }
ChainlinkApplication contains fields for the JobSubscriber, Scheduler, and Store. The JobSubscriber and Scheduler are also available in the services package, but the Store has its own package.
func (*ChainlinkApplication) BPTXMORM ¶ added in v1.10.17
func (app *ChainlinkApplication) BPTXMORM() bulletprooftxmanager.ORM
func (*ChainlinkApplication) BridgeORM ¶ added in v1.10.17
func (app *ChainlinkApplication) BridgeORM() bridges.ORM
func (*ChainlinkApplication) DeleteJob ¶ added in v1.10.17
func (app *ChainlinkApplication) DeleteJob(ctx context.Context, jobID int32) error
func (*ChainlinkApplication) EVMORM ¶ added in v1.10.17
func (app *ChainlinkApplication) EVMORM() evmtypes.ORM
func (*ChainlinkApplication) GetChainSet ¶ added in v1.10.17
func (app *ChainlinkApplication) GetChainSet() evm.ChainSet
func (*ChainlinkApplication) GetConfig ¶
func (app *ChainlinkApplication) GetConfig() config.GeneralConfig
func (*ChainlinkApplication) GetDB ¶ added in v1.10.17
func (app *ChainlinkApplication) GetDB() *gorm.DB
func (*ChainlinkApplication) GetEventBroadcaster ¶ added in v1.10.17
func (app *ChainlinkApplication) GetEventBroadcaster() postgres.EventBroadcaster
func (*ChainlinkApplication) GetExternalInitiatorManager ¶
func (app *ChainlinkApplication) GetExternalInitiatorManager() webhook.ExternalInitiatorManager
func (*ChainlinkApplication) GetFeedsService ¶
func (app *ChainlinkApplication) GetFeedsService() feeds.Service
func (*ChainlinkApplication) GetHealthChecker ¶
func (app *ChainlinkApplication) GetHealthChecker() health.Checker
func (*ChainlinkApplication) GetKeyStore ¶
func (app *ChainlinkApplication) GetKeyStore() keystore.Master
func (*ChainlinkApplication) GetLogger ¶
func (app *ChainlinkApplication) GetLogger() logger.Logger
func (*ChainlinkApplication) GetWebAuthnConfiguration ¶ added in v1.10.17
func (app *ChainlinkApplication) GetWebAuthnConfiguration() sessions.WebAuthnConfiguration
Returns the configuration to use for creating and authenticating new WebAuthn credentials
func (*ChainlinkApplication) JobORM ¶
func (app *ChainlinkApplication) JobORM() job.ORM
func (*ChainlinkApplication) JobSpawner ¶
func (app *ChainlinkApplication) JobSpawner() job.Spawner
func (*ChainlinkApplication) NewBox ¶
func (app *ChainlinkApplication) NewBox() packr.Box
NewBox returns the packr.Box instance that holds the static assets to be delivered by the router.
func (*ChainlinkApplication) PipelineORM ¶
func (app *ChainlinkApplication) PipelineORM() pipeline.ORM
func (*ChainlinkApplication) ReplayFromBlock ¶
func (app *ChainlinkApplication) ReplayFromBlock(chainID *big.Int, number uint64) error
func (*ChainlinkApplication) ResumeJobV2 ¶
func (*ChainlinkApplication) RunJobV2 ¶
func (app *ChainlinkApplication) RunJobV2( ctx context.Context, jobID int32, meta map[string]interface{}, ) (int64, error)
Only used for local testing, not supported by the UI.
func (*ChainlinkApplication) RunWebhookJobV2 ¶
func (app *ChainlinkApplication) RunWebhookJobV2(ctx context.Context, jobUUID uuid.UUID, requestBody string, meta pipeline.JSONSerializable) (int64, error)
func (*ChainlinkApplication) SessionORM ¶ added in v1.10.17
func (app *ChainlinkApplication) SessionORM() sessions.ORM
func (*ChainlinkApplication) SetLogLevel ¶ added in v1.10.17
func (*ChainlinkApplication) SetServiceLogLevel ¶ added in v1.10.17
func (app *ChainlinkApplication) SetServiceLogLevel(ctx context.Context, serviceName string, level zapcore.Level) error
SetServiceLogLevel sets the Logger level for a given service and stores the setting in the db.
func (*ChainlinkApplication) Start ¶
func (app *ChainlinkApplication) Start() error
Start all necessary services. If successful, nil will be returned. Also listens for interrupt signals from the operating system so that the application can be properly closed before the application exits.
func (*ChainlinkApplication) Stop ¶
func (app *ChainlinkApplication) Stop() error
Stop allows the application to exit by halting schedules, closing logs, and closing the DB connection.
func (*ChainlinkApplication) StopIfStarted ¶
func (app *ChainlinkApplication) StopIfStarted() error
func (*ChainlinkApplication) WakeSessionReaper ¶
func (app *ChainlinkApplication) WakeSessionReaper()
WakeSessionReaper wakes up the reaper to do its reaping.