chainlink

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2020 License: MIT Imports: 18 Imported by: 0

Documentation

Index

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
	GetStore() *strpkg.Store
	GetStatsPusher() synchronization.StatsPusher
	WakeSessionReaper()
	AddJob(job models.JobSpec) error
	ArchiveJob(*models.ID) error
	AddServiceAgreement(*models.ServiceAgreement) error
	NewBox() packr.Box
	services.RunManager
}

Application implements the common functions used in the core node.

func NewApplication

func NewApplication(config *orm.Config, onConnectCallbacks ...func(Application)) Application

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.

type ChainlinkApplication

type ChainlinkApplication struct {
	Exiter      func(int)
	HeadTracker *services.HeadTracker
	StatsPusher synchronization.StatsPusher
	services.RunManager
	RunQueue       services.RunQueue
	JobSubscriber  services.JobSubscriber
	GasUpdater     services.GasUpdater
	EthBroadcaster bulletprooftxmanager.EthBroadcaster
	LogBroadcaster eth.LogBroadcaster
	FluxMonitor    fluxmonitor.Service
	Scheduler      *services.Scheduler
	Store          *strpkg.Store
	SessionReaper  services.SleeperTask
	// 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) AddJob

func (app *ChainlinkApplication) AddJob(job models.JobSpec) error

AddJob adds a job to the store and the scheduler. If there was an error from adding the job to the store, the job will not be added to the scheduler.

func (*ChainlinkApplication) AddServiceAgreement

func (app *ChainlinkApplication) AddServiceAgreement(sa *models.ServiceAgreement) error

AddServiceAgreement adds a Service Agreement which includes a job that needs to be scheduled.

func (*ChainlinkApplication) ArchiveJob

func (app *ChainlinkApplication) ArchiveJob(ID *models.ID) error

ArchiveJob silences the job from the system, preventing future job runs.

func (*ChainlinkApplication) GetStatsPusher

func (app *ChainlinkApplication) GetStatsPusher() synchronization.StatsPusher

func (*ChainlinkApplication) GetStore

func (app *ChainlinkApplication) GetStore() *strpkg.Store

GetStore returns the pointer to the store for the ChainlinkApplication.

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) 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) WakeSessionReaper

func (app *ChainlinkApplication) WakeSessionReaper()

WakeSessionReaper wakes up the reaper to do its reaping.

Jump to

Keyboard shortcuts

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