Documentation ¶
Overview ¶
Package services contain the key components of the Chainlink node. This includes the Application, JobRunner, LogListener, and Scheduler.
Application ¶
The Application is the main component used for starting and stopping the Chainlink node.
JobRunner ¶
The JobRunner keeps track of Runs within a Job and ensures that they're executed in order. Within each Run, the tasks are also executed from the JobRunner.
JobSubscriber ¶
The JobSubscriber coordinates running job events with the EventLog in the Store, and also subscribes to the given address on the Ethereum blockchain.
Scheduler ¶
The Scheduler ensures that recurring events are executed according to their schedule, and one-time events occur only when the specified time has passed.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Checkable ¶ added in v1.2.0
type Checkable interface { // Checkables should return nil if ready, or an error message otherwise. Ready() error // Checkables should return nil if healthy, or an error message otherwise. Healthy() error }
Checkable should be implemented by any type requiring health checks.
type Checker ¶ added in v1.2.0
type Checker interface { // Register a service for health checks. Register(name string, service Checkable) error // Unregister a service. Unregister(name string) error // IsReady returns the current readiness of the system. // A system is considered ready if all checks are passing (no errors) IsReady() (ready bool, errors map[string]error) // IsHealthy returns the current health of the system. // A system is considered healthy if all checks are passing (no errors) IsHealthy() (healthy bool, errors map[string]error) Start() error Close() error }
Checker provides a service which can be probed for system health.
func NewChecker ¶ added in v1.2.0
func NewChecker() Checker
type Config ¶ added in v1.2.0
type Config interface { AutoPprofProfileRoot() string AutoPprofPollInterval() models.Duration AutoPprofGatherDuration() models.Duration AutoPprofGatherTraceDuration() models.Duration AutoPprofMaxProfileSize() utils.FileSize AutoPprofCPUProfileRate() int AutoPprofMemProfileRate() int AutoPprofBlockProfileRate() int AutoPprofMutexProfileFraction() int AutoPprofMemThreshold() utils.FileSize AutoPprofGoroutineThreshold() int }
type Nurse ¶ added in v1.2.0
type Nurse struct { utils.StartStopOnce // contains filtered or unexported fields }
func (*Nurse) GatherVitals ¶ added in v1.2.0
type Service ¶ added in v1.2.0
type Service interface { // Start the service. Start() error // Close stops the Service. // Invariants: Usually after this call the Service cannot be started // again, you need to build a new Service to do so. Close() error Checkable }
Service represents a long running service inside the Application.
Typically a Service will leverage utils.StartStopOnce to implement these calls in a safe manner.
Template ¶
Mockable Foo service with a run loop
//go:generate mockery --name Foo --output ../internal/mocks/ --case=underscore type ( // Expose a public interface so we can mock the service. Foo interface { service.Service // ... } foo struct { // ... stop chan struct{} done chan struct{} utils.StartStopOnce } ) var _ Foo = (*foo)(nil) func NewFoo() Foo { f := &foo{ // ... } return f } func (f *foo) Start() error { return f.StartOnce("Foo", func() error { go f.run() return nil }) } func (f *foo) Close() error { return f.StopOnce("Foo", func() error { // trigger goroutine cleanup close(f.stop) // wait for cleanup to complete <-f.done return nil }) } func (f *foo) run() { // signal cleanup completion defer close(f.done) for { select { // ... case <-f.stop: // stop the routine return } } }
Directories ¶
Path | Synopsis |
---|---|
types
Types are shared with external relay libraries so they can implement the interfaces required to run as a core OCR job.
|
Types are shared with external relay libraries so they can implement the interfaces required to run as a core OCR job. |
signatures
|
|
cryptotest
Package cryptotest provides convenience functions for kyber-based APIs.
|
Package cryptotest provides convenience functions for kyber-based APIs. |
ethdss
Package ethdss implements the Distributed Schnorr Signature protocol from the ////////////////////////////////////////////////////////////////////////////// XXX: Do not use in production until this code has been audited.
|
Package ethdss implements the Distributed Schnorr Signature protocol from the ////////////////////////////////////////////////////////////////////////////// XXX: Do not use in production until this code has been audited. |
ethschnorr
Package ethschnorr implements a version of the Schnorr signature which is ////////////////////////////////////////////////////////////////////////////// XXX: Do not use in production until this code has been audited.
|
Package ethschnorr implements a version of the Schnorr signature which is ////////////////////////////////////////////////////////////////////////////// XXX: Do not use in production until this code has been audited. |
secp256k1
Package secp256k1 is an implementation of the kyber.{Group,Point,Scalar} ////////////////////////////////////////////////////////////////////////////// XXX: Do not use in production until this code has been audited.
|
Package secp256k1 is an implementation of the kyber.{Group,Point,Scalar} ////////////////////////////////////////////////////////////////////////////// XXX: Do not use in production until this code has been audited. |