config

package
v0.10.11 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2021 License: MIT Imports: 39 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnset   = errors.New("env var unset")
	ErrInvalid = errors.New("env var invalid")
)

Functions

func EnvVarName

func EnvVarName(field string) string

EnvVarName gets the environment variable name for a config schema field

Types

type Config

type Config struct {
	SecretGenerator SecretGenerator
	ORM             *ORM

	Dialect        dialects.DialectName
	AdvisoryLockID int64
	// contains filtered or unexported fields
}

Config holds parameters used by the application which can be overridden by setting environment variables.

If you add an entry here which does not contain sensitive information, you should also update presenters.ConfigWhitelist and cmd_test.TestClient_RunNodeShowsEnv. TODO: Make this private and expose an interface?

func NewConfig

func NewConfig() *Config

NewConfig returns the config with the environment variables set to their respective fields, or their defaults if environment variables are not set.

func (Config) AdminCredentialsFile

func (c Config) AdminCredentialsFile() string

AdminCredentialsFile points to text file containing admnn credentials for logging in

func (Config) AllowOrigins

func (c Config) AllowOrigins() string

AllowOrigins returns the CORS hosts used by the frontend.

func (Config) AuthenticatedRateLimit

func (c Config) AuthenticatedRateLimit() int64

AuthenticatedRateLimit defines the threshold to which requests authenticated requests get limited

func (Config) AuthenticatedRateLimitPeriod

func (c Config) AuthenticatedRateLimitPeriod() models.Duration

AuthenticatedRateLimitPeriod defines the period to which authenticated requests get limited

func (Config) BalanceMonitorEnabled

func (c Config) BalanceMonitorEnabled() bool

BalanceMonitorEnabled enables the balance monitor

func (Config) BlockBackfillDepth

func (c Config) BlockBackfillDepth() uint64

BlockBackfillDepth specifies the number of blocks before the current HEAD that the log broadcaster will try to re-consume logs from

func (Config) BlockBackfillSkip

func (c Config) BlockBackfillSkip() bool

BlockBackfillSkip enables skipping of very long log backfills

func (Config) BlockEmissionIdleWarningThreshold

func (c Config) BlockEmissionIdleWarningThreshold() time.Duration

BlockEmissionIdleWarningThreshold is the duration of time since last received head to print a warning log message indicating not receiving heads

func (Config) BlockHistoryEstimatorBatchSize

func (c Config) BlockHistoryEstimatorBatchSize() (size uint32)

BlockHistoryEstimatorBatchSize sets the maximum number of blocks to fetch in one batch in the block history estimator If the env var GAS_UPDATER_BATCH_SIZE is set to 0, it defaults to ETH_RPC_DEFAULT_BATCH_SIZE

func (Config) BlockHistoryEstimatorBlockDelay

func (c Config) BlockHistoryEstimatorBlockDelay() uint16

BlockHistoryEstimatorBlockDelay is the number of blocks that the block history estimator trails behind head. E.g. if this is set to 3, and we receive block 10, block history estimator will fetch block 7. CAUTION: You might be tempted to set this to 0 to use the latest possible block, but it is possible to receive a head BEFORE that block is actually available from the connected node via RPC. In this case you will get false "zero" blocks that are missing transactions.

func (Config) BlockHistoryEstimatorBlockHistorySize

func (c Config) BlockHistoryEstimatorBlockHistorySize() uint16

BlockHistoryEstimatorBlockHistorySize is the number of past blocks to keep in memory to use as a basis for calculating a percentile gas price

func (Config) BlockHistoryEstimatorTransactionPercentile

func (c Config) BlockHistoryEstimatorTransactionPercentile() uint16

BlockHistoryEstimatorTransactionPercentile is the percentile gas price to choose. E.g. if the past transaction history contains four transactions with gas prices: [100, 200, 300, 400], picking 25 for this number will give a value of 200

func (Config) BridgeResponseURL

func (c Config) BridgeResponseURL() *url.URL

BridgeResponseURL represents the URL for bridges to send a response to.

func (Config) CertFile

func (c Config) CertFile() string

CertFile returns the path where the server certificate is kept

func (Config) Chain

func (c Config) Chain() *chains.Chain

func (Config) ChainID

func (c Config) ChainID() *big.Int

ChainID represents the chain ID to use for transactions.

func (Config) ClientNodeURL

func (c Config) ClientNodeURL() string

ClientNodeURL is the URL of the Ethereum node this Chainlink node should connect to.

func (Config) CreateProductionLogger

func (c Config) CreateProductionLogger() *logger.Logger

CreateProductionLogger returns a custom logger for the config's root directory and LogLevel, with pretty printing for stdout. If LOG_TO_DISK is false, the logger will only log to stdout.

func (Config) DatabaseBackupDir

func (c Config) DatabaseBackupDir() string

DatabaseBackupDir configures the directory for saving the backup file, if it's to be different from default one located in the RootDir

func (Config) DatabaseBackupFrequency

func (c Config) DatabaseBackupFrequency() time.Duration

DatabaseBackupFrequency turns on the periodic database backup if set to a positive value DatabaseBackupMode must be then set to a value other than "none"

func (Config) DatabaseBackupMode

func (c Config) DatabaseBackupMode() DatabaseBackupMode

DatabaseBackupMode sets the database backup mode

func (Config) DatabaseBackupURL

func (c Config) DatabaseBackupURL() *url.URL

DatabaseBackupURL configures the URL for the database to backup, if it's to be different from the main on

func (Config) DatabaseListenerMaxReconnectDuration

func (c Config) DatabaseListenerMaxReconnectDuration() time.Duration

func (Config) DatabaseListenerMinReconnectInterval

func (c Config) DatabaseListenerMinReconnectInterval() time.Duration

func (Config) DatabaseMaximumTxDuration

func (c Config) DatabaseMaximumTxDuration() time.Duration

func (Config) DatabaseTimeout

func (c Config) DatabaseTimeout() models.Duration

DatabaseTimeout represents how long to tolerate non response from the DB.

func (Config) DatabaseURL

func (c Config) DatabaseURL() url.URL

DatabaseURL configures the URL for chainlink to connect to. This must be a properly formatted URL, with a valid scheme (postgres://)

func (Config) DefaultHTTPAllowUnrestrictedNetworkAccess

func (c Config) DefaultHTTPAllowUnrestrictedNetworkAccess() bool

DefaultHTTPAllowUnrestrictedNetworkAccess controls whether http requests are unrestricted by default It is recommended that this be left disabled

func (Config) DefaultHTTPLimit

func (c Config) DefaultHTTPLimit() int64

DefaultHTTPLimit defines the size limit for HTTP requests and responses

func (Config) DefaultHTTPTimeout

func (c Config) DefaultHTTPTimeout() models.Duration

DefaultHTTPTimeout defines the default timeout for http requests

func (Config) DefaultMaxHTTPAttempts

func (c Config) DefaultMaxHTTPAttempts() uint

DefaultMaxHTTPAttempts defines the limit for HTTP requests.

func (Config) Dev

func (c Config) Dev() bool

Dev configures "development" mode for chainlink.

func (Config) EnableExperimentalAdapters

func (c Config) EnableExperimentalAdapters() bool

EnableExperimentalAdapters enables support for experimental adapters

func (Config) EnableLegacyJobPipeline

func (c Config) EnableLegacyJobPipeline() bool

EnableLegacyJobPipeline enables the v1 job pipeline (JSON job specs)

func (Config) EthBalanceMonitorBlockDelay

func (c Config) EthBalanceMonitorBlockDelay() uint16

EthBalanceMonitorBlockDelay is the number of blocks that the balance monitor trails behind head. This is required e.g. for Infura because they will often announce a new head, then route a request to a different node which does not have this head yet.

func (Config) EthFinalityDepth

func (c Config) EthFinalityDepth() uint

EthFinalityDepth is the number of blocks after which an ethereum transaction is considered "final" BlocksConsideredFinal determines how deeply we look back to ensure that transactions are confirmed onto the longest chain There is not a large performance penalty to setting this relatively high (on the order of hundreds) It is practically limited by the number of heads we store in the database and should be less than this with a comfortable margin. If a transaction is mined in a block more than this many blocks ago, and is reorged out, we will NOT retransmit this transaction and undefined behaviour can occur including gaps in the nonce sequence that require manual intervention to fix. Therefore this number represents a number of blocks we consider large enough that no re-org this deep will ever feasibly happen.

Special cases: ETH_FINALITY_DEPTH=0 would imply that transactions can be final even before they were mined into a block. This is not supported. ETH_FINALITY_DEPTH=1 implies that transactions are final after we see them in one block.

Examples:

Transaction sending: A transaction is sent at block height 42

ETH_FINALITY_DEPTH is set to 5 A re-org occurs at height 44 starting at block 41, transaction is marked for rebroadcast A re-org occurs at height 46 starting at block 41, transaction is marked for rebroadcast A re-org occurs at height 47 starting at block 41, transaction is NOT marked for rebroadcast

func (Config) EthGasBumpPercent

func (c Config) EthGasBumpPercent() uint16

EthGasBumpPercent is the minimum percentage by which gas is bumped on each transaction attempt Change with care since values below geth's default will fail with "underpriced replacement transaction"

func (Config) EthGasBumpThreshold

func (c Config) EthGasBumpThreshold() uint64

EthGasBumpThreshold is the number of blocks to wait before bumping gas again on unconfirmed transactions Set to 0 to disable gas bumping

func (Config) EthGasBumpTxDepth

func (c Config) EthGasBumpTxDepth() uint16

EthGasBumpTxDepth is the number of transactions to gas bump starting from oldest. Set to 0 for no limit (i.e. bump all)

func (Config) EthGasBumpWei

func (c Config) EthGasBumpWei() *big.Int

EthGasBumpWei is the minimum fixed amount of wei by which gas is bumped on each transaction attempt

func (Config) EthGasLimitDefault

func (c Config) EthGasLimitDefault() uint64

EthGasLimitDefault sets the default gas limit for outgoing transactions.

func (Config) EthGasLimitMultiplier

func (c Config) EthGasLimitMultiplier() float32

EthGasLimitMultiplier is a factor by which a transaction's GasLimit is multiplied before transmission. So if the value is 1.1, and the GasLimit for a transaction is 10, 10% will be added before transmission.

This factor is always applied, so includes Optimism L2 transactions which uses a default gas limit of 1 and is also applied to EthGasLimitDefault.

func (Config) EthGasLimitTransfer

func (c Config) EthGasLimitTransfer() uint64

EthGasLimitTransfer is the gas limit for an ordinary eth->eth transfer

func (Config) EthGasPriceDefault

func (c Config) EthGasPriceDefault() *big.Int

EthGasPriceDefault is the starting gas price for every transaction

func (Config) EthHeadTrackerHistoryDepth

func (c Config) EthHeadTrackerHistoryDepth() uint

EthHeadTrackerHistoryDepth tracks the top N block numbers to keep in the `heads` database table. Note that this can easily result in MORE than N records since in the case of re-orgs we keep multiple heads for a particular block height. This number should be at least as large as `EthFinalityDepth`. There may be a small performance penalty to setting this to something very large (10,000+)

func (Config) EthHeadTrackerMaxBufferSize

func (c Config) EthHeadTrackerMaxBufferSize() uint

EthHeadTrackerMaxBufferSize is the maximum number of heads that may be buffered in front of the head tracker before older heads start to be dropped. You may think of it as something like the maximum permittable "lag" for the head tracker before we start dropping heads to keep up.

func (Config) EthHeadTrackerSamplingInterval

func (c Config) EthHeadTrackerSamplingInterval() time.Duration

EthHeadTrackerSamplingInterval is the interval between sampled head callbacks to services that are only interested in the latest head every some time

func (Config) EthLogBackfillBatchSize

func (c Config) EthLogBackfillBatchSize() uint32

EthLogBackfillBatchSize sets the batch size for calling FilterLogs when we backfill missing logs

func (Config) EthMaxGasPriceWei

func (c Config) EthMaxGasPriceWei() *big.Int

EthMaxGasPriceWei is the maximum amount in Wei that a transaction will be bumped to before abandoning it and marking it as errored.

func (Config) EthMaxInFlightTransactions

func (c Config) EthMaxInFlightTransactions() uint32

EthMaxInFlightTransactions controls how many transactions are allowed to be "in-flight" i.e. broadcast but unconfirmed at any one time 0 value disables the limit

func (Config) EthMaxQueuedTransactions

func (c Config) EthMaxQueuedTransactions() uint64

EthMaxQueuedTransactions is the maximum number of unbroadcast transactions per key that are allowed to be enqueued before jobs will start failing and rejecting send of any further transactions. 0 value disables

func (Config) EthMinGasPriceWei

func (c Config) EthMinGasPriceWei() *big.Int

EthMinGasPriceWei is the minimum amount in Wei that a transaction may be priced. Chainlink will never send a transaction priced below this amount.

func (Config) EthNonceAutoSync

func (c Config) EthNonceAutoSync() bool

EthNonceAutoSync enables/disables running the NonceSyncer on application start

func (Config) EthRPCDefaultBatchSize

func (c Config) EthRPCDefaultBatchSize() uint32

EthRPCDefaultBatchSize controls the number of receipts fetched in each request in the EthConfirmer

func (Config) EthTxReaperInterval

func (c Config) EthTxReaperInterval() time.Duration

EthTxReaperInterval controls how often the eth tx reaper should run

func (Config) EthTxReaperThreshold

func (c Config) EthTxReaperThreshold() time.Duration

EthTxReaperThreshold represents how long any confirmed/fatally_errored eth_txes will hang around in the database. If the eth_tx is confirmed but still below ETH_FINALITY_DEPTH it will not be deleted even if it was created at a time older than this value. EXAMPLE With: EthTxReaperThreshold=1h EthFinalityDepth=50

Current head is 142, any eth_tx confirmed in block 91 or below will be reaped as long as its created_at was more than EthTxReaperThreshold ago Set to 0 to disable eth_tx reaping

func (Config) EthTxResendAfterThreshold

func (c Config) EthTxResendAfterThreshold() time.Duration

EthTxResendAfterThreshold controls how long the ethResender will wait before re-sending the latest eth_tx_attempt. This is designed a as a fallback to protect against the eth nodes dropping txes (it has been anecdotally observed to happen), networking issues or txes being ejected from the mempool. See eth_resender.go for more details

func (Config) EthereumDisabled

func (c Config) EthereumDisabled() bool

EthereumDisabled shows whether Ethereum interactions are supported.

func (Config) EthereumHTTPURL

func (c Config) EthereumHTTPURL() (uri *url.URL)

EthereumHTTPURL is an optional but recommended url that points to the HTTP port of the primary node

func (Config) EthereumSecondaryURLs

func (c Config) EthereumSecondaryURLs() []url.URL

EthereumSecondaryURLs is an optional backup RPC URL Must be http(s) format If specified, transactions will also be broadcast to this ethereum node

func (Config) EthereumURL

func (c Config) EthereumURL() string

EthereumURL represents the URL of the Ethereum node to connect Chainlink to.

func (Config) ExplorerAccessKey

func (c Config) ExplorerAccessKey() string

ExplorerAccessKey returns the access key for authenticating with explorer

func (Config) ExplorerSecret

func (c Config) ExplorerSecret() string

ExplorerSecret returns the secret for authenticating with explorer

func (Config) ExplorerURL

func (c Config) ExplorerURL() *url.URL

ExplorerURL returns the websocket URL for this node to push stats to, or nil.

func (Config) FMDefaultTransactionQueueDepth

func (c Config) FMDefaultTransactionQueueDepth() uint32

FMDefaultTransactionQueueDepth controls the queue size for DropOldestStrategy in Flux Monitor Set to 0 to use SendEvery strategy instead

func (Config) FeatureCronV2

func (c Config) FeatureCronV2() bool

FeatureCronV2 enables the Cron v2 feature.

func (Config) FeatureExternalInitiators

func (c Config) FeatureExternalInitiators() bool

FeatureExternalInitiators enables the External Initiator feature.

func (Config) FeatureFluxMonitor

func (c Config) FeatureFluxMonitor() bool

FeatureFluxMonitor enables the Flux Monitor job type.

func (Config) FeatureFluxMonitorV2

func (c Config) FeatureFluxMonitorV2() bool

FeatureFluxMonitorV2 enables the Flux Monitor v2 job type.

func (Config) FeatureOffchainReporting

func (c Config) FeatureOffchainReporting() bool

FeatureOffchainReporting enables the Flux Monitor job type.

func (Config) FeatureWebhookV2

func (c Config) FeatureWebhookV2() bool

FeatureWebhookV2 enables the Webhook v2 job type

func (Config) FlagsContractAddress

func (c Config) FlagsContractAddress() string

FlagsContractAddress represents the Flags contract address

func (Config) GasEstimatorMode

func (c Config) GasEstimatorMode() string

GasEstimatorMode controls what type of gas estimator is used

func (Config) GetAdvisoryLockIDConfiguredOrDefault

func (c Config) GetAdvisoryLockIDConfiguredOrDefault() int64

func (Config) GetDatabaseDialectConfiguredOrDefault

func (c Config) GetDatabaseDialectConfiguredOrDefault() dialects.DialectName

func (Config) GlobalLockRetryInterval

func (c Config) GlobalLockRetryInterval() models.Duration

GlobalLockRetryInterval represents how long to wait before trying again to get the global advisory lock.

func (Config) HTTPServerWriteTimeout

func (c Config) HTTPServerWriteTimeout() time.Duration

func (Config) InsecureFastScrypt

func (c Config) InsecureFastScrypt() bool

InsecureFastScrypt causes all key stores to encrypt using "fast" scrypt params instead This is insecure and only useful for local testing. DO NOT SET THIS IN PRODUCTION

func (Config) InsecureSkipVerify

func (c Config) InsecureSkipVerify() bool

InsecureSkipVerify disables SSL certificiate verification when connection to a chainlink client using the remote client, i.e. when executing most remote commands in the CLI.

This is mostly useful for people who want to use TLS on localhost.

func (Config) JSONConsole

func (c Config) JSONConsole() bool

JSONConsole when set to true causes logging to be made in JSON format If set to false, logs in console format

func (Config) JobPipelineMaxRunDuration

func (c Config) JobPipelineMaxRunDuration() time.Duration

JobPipelineMaxRunDuration is the maximum time that a job run may take

func (Config) JobPipelineReaperInterval

func (c Config) JobPipelineReaperInterval() time.Duration

func (Config) JobPipelineReaperThreshold

func (c Config) JobPipelineReaperThreshold() time.Duration

func (Config) JobPipelineResultWriteQueueDepth

func (c Config) JobPipelineResultWriteQueueDepth() uint64

func (Config) KeeperDefaultTransactionQueueDepth

func (c Config) KeeperDefaultTransactionQueueDepth() uint32

KeeperDefaultTransactionQueueDepth controls the queue size for DropOldestStrategy in Keeper Set to 0 to use SendEvery strategy instead

func (Config) KeeperMaximumGracePeriod

func (c Config) KeeperMaximumGracePeriod() int64

KeeperMaximumGracePeriod is the maximum number of blocks that a keeper will wait after performing an upkeep before it resumes checking that upkeep

func (Config) KeeperMinimumRequiredConfirmations

func (c Config) KeeperMinimumRequiredConfirmations() uint64

KeeperMinimumRequiredConfirmations is the minimum number of confirmations that a keeper registry log needs before it is handled by the RegistrySynchronizer

func (Config) KeeperRegistryCheckGasOverhead

func (c Config) KeeperRegistryCheckGasOverhead() uint64

KeeperRegistryCheckGasOverhead is the amount of extra gas to provide checkUpkeep() calls to account for the gas consumed by the keeper registry

func (Config) KeeperRegistryPerformGasOverhead

func (c Config) KeeperRegistryPerformGasOverhead() uint64

KeeperRegistryPerformGasOverhead is the amount of extra gas to provide performUpkeep() calls to account for the gas consumed by the keeper registry

func (Config) KeeperRegistrySyncInterval

func (c Config) KeeperRegistrySyncInterval() time.Duration

KeeperRegistrySyncInterval is the interval in which the RegistrySynchronizer performs a full sync of the keeper registry contract it is tracking

func (Config) KeyFile

func (c Config) KeyFile() string

KeyFile returns the path where the server key is kept

func (Config) LinkContractAddress

func (c Config) LinkContractAddress() string

LinkContractAddress represents the address of the official LINK token contract on the current Chain

func (Config) LogLevel

func (c Config) LogLevel() LogLevel

LogLevel represents the maximum level of log messages to output.

func (Config) LogSQLMigrations

func (c Config) LogSQLMigrations() bool

LogSQLMigrations tells chainlink to log all SQL migrations made using the default logger

func (Config) LogSQLStatements

func (c Config) LogSQLStatements() bool

LogSQLStatements tells chainlink to log all SQL statements made using the default logger

func (Config) LogToDisk

func (c Config) LogToDisk() bool

LogToDisk configures disk preservation of logs.

func (Config) MaximumServiceDuration

func (c Config) MaximumServiceDuration() models.Duration

MaximumServiceDuration is the maximum time that a service agreement can run from after the time it is created. Default 1 year = 365 * 24h = 8760h

func (Config) MigrateDatabase

func (c Config) MigrateDatabase() bool

MigrateDatabase determines whether the database will be automatically migrated on application startup if set to true

func (Config) MinIncomingConfirmations

func (c Config) MinIncomingConfirmations() uint32

MinIncomingConfirmations represents the minimum number of block confirmations that need to be recorded since a job run started before a task can proceed. MIN_INCOMING_CONFIRMATIONS=1 would kick off a job after seeing the transaction in a block MIN_INCOMING_CONFIRMATIONS=0 would kick off a job even before the transaction is mined, which is not supported

func (Config) MinRequiredOutgoingConfirmations

func (c Config) MinRequiredOutgoingConfirmations() uint64

MinRequiredOutgoingConfirmations represents the default minimum number of block confirmations that need to be recorded on an outgoing ethtx task before the run can move onto the next task. This can be overridden on a per-task basis by setting the `MinRequiredOutgoingConfirmations` parameter. MIN_OUTGOING_CONFIRMATIONS=1 considers a transaction as "done" once it has been mined into one block MIN_OUTGOING_CONFIRMATIONS=0 would consider a transaction as "done" even before it has been mined

func (Config) MinimumContractPayment

func (c Config) MinimumContractPayment() *assets.Link

MinimumContractPayment represents the minimum amount of LINK that must be supplied for a contract to be considered.

func (Config) MinimumRequestExpiration

func (c Config) MinimumRequestExpiration() uint64

MinimumRequestExpiration is the minimum allowed request expiration for a Service Agreement.

func (Config) MinimumServiceDuration

func (c Config) MinimumServiceDuration() models.Duration

MinimumServiceDuration is the shortest duration from now that a service is allowed to run.

func (Config) OCRBlockchainTimeout

func (c Config) OCRBlockchainTimeout(override time.Duration) time.Duration

func (Config) OCRBootstrapCheckInterval

func (c Config) OCRBootstrapCheckInterval() time.Duration

FIXME: Add comments to all of these

func (Config) OCRContractConfirmations

func (c Config) OCRContractConfirmations(override uint16) uint16

func (Config) OCRContractPollInterval

func (c Config) OCRContractPollInterval(override time.Duration) time.Duration

func (Config) OCRContractSubscribeInterval

func (c Config) OCRContractSubscribeInterval(override time.Duration) time.Duration

func (Config) OCRContractTransmitterTransmitTimeout

func (c Config) OCRContractTransmitterTransmitTimeout() time.Duration

func (Config) OCRDHTLookupInterval

func (c Config) OCRDHTLookupInterval() int

func (Config) OCRDatabaseTimeout

func (c Config) OCRDatabaseTimeout() time.Duration

func (Config) OCRDefaultTransactionQueueDepth

func (c Config) OCRDefaultTransactionQueueDepth() uint32

OCRDefaultTransactionQueueDepth controls the queue size for DropOldestStrategy in OCR Set to 0 to use SendEvery strategy instead

func (Config) OCRIncomingMessageBufferSize

func (c Config) OCRIncomingMessageBufferSize() int

func (Config) OCRKeyBundleID

func (c Config) OCRKeyBundleID(override *models.Sha256Hash) (models.Sha256Hash, error)

func (Config) OCRMonitoringEndpoint

func (c Config) OCRMonitoringEndpoint(override string) string

func (Config) OCRNewStreamTimeout

func (c Config) OCRNewStreamTimeout() time.Duration

func (Config) OCRObservationGracePeriod

func (c Config) OCRObservationGracePeriod() time.Duration

func (Config) OCRObservationTimeout

func (c Config) OCRObservationTimeout(override time.Duration) time.Duration

func (Config) OCROutgoingMessageBufferSize

func (c Config) OCROutgoingMessageBufferSize() int

func (Config) OCRTraceLogging

func (c Config) OCRTraceLogging() bool

OCRTraceLogging determines whether OCR logs at TRACE level are enabled. The option to turn them off is given because they can be very verbose

func (Config) OCRTransmitterAddress

func (c Config) OCRTransmitterAddress(override *ethkey.EIP55Address) (ethkey.EIP55Address, error)

func (Config) ORMMaxIdleConns

func (c Config) ORMMaxIdleConns() int

func (Config) ORMMaxOpenConns

func (c Config) ORMMaxOpenConns() int

func (Config) OperatorContractAddress

func (c Config) OperatorContractAddress() common.Address

OperatorContractAddress represents the address where the Operator.sol contract is deployed, this is used for filtering RunLog requests

func (Config) P2PAnnounceIP

func (c Config) P2PAnnounceIP() net.IP

P2PAnnounceIP is an optional override. If specified it will force the p2p layer to announce this IP as the externally reachable one to the DHT If this is set, P2PAnnouncePort MUST also be set.

func (Config) P2PAnnouncePort

func (c Config) P2PAnnouncePort() uint16

P2PAnnouncePort is an optional override. If specified it will force the p2p layer to announce this port as the externally reachable one to the DHT. If this is set, P2PAnnounceIP MUST also be set.

func (Config) P2PBootstrapPeers

func (c Config) P2PBootstrapPeers(override []string) ([]string, error)

func (Config) P2PDHTAnnouncementCounterUserPrefix

func (c Config) P2PDHTAnnouncementCounterUserPrefix() uint32

P2PDHTAnnouncementCounterUserPrefix can be used to restore the node's ability to announce its IP/port on the P2P network after a database rollback. Make sure to only increase this value, and *never* decrease it. Don't use this variable unless you really know what you're doing, since you could semi-permanently exclude your node from the P2P network by misconfiguring it.

func (Config) P2PListenIP

func (c Config) P2PListenIP() net.IP

P2PListenIP is the ip that libp2p willl bind to and listen on

func (*Config) P2PListenPort

func (c *Config) P2PListenPort() uint16

P2PListenPort is the port that libp2p will bind to and listen on

func (Config) P2PListenPortRaw

func (c Config) P2PListenPortRaw() string

P2PListenPortRaw returns the raw string value of P2P_LISTEN_PORT

func (Config) P2PNetworkingStack

func (c Config) P2PNetworkingStack() (n ocrnetworking.NetworkingStack)

P2PNetworkingStack returns the preferred networking stack for libocr

func (Config) P2PNetworkingStackRaw

func (c Config) P2PNetworkingStackRaw() string

P2PNetworkingStackRaw returns the raw string passed as networking stack

func (Config) P2PPeerID

func (c Config) P2PPeerID(override *p2pkey.PeerID) (p2pkey.PeerID, error)

P2PPeerID is the default peer ID that will be used, if not overridden

func (Config) P2PPeerIDIsSet

func (c Config) P2PPeerIDIsSet() bool

func (Config) P2PPeerIDRaw

func (c Config) P2PPeerIDRaw() string

P2PPeerIDRaw returns the string value of whatever P2P_PEER_ID was set to with no parsing

func (Config) P2PPeerstoreWriteInterval

func (c Config) P2PPeerstoreWriteInterval() time.Duration

func (Config) P2PV2AnnounceAddresses

func (c Config) P2PV2AnnounceAddresses() []string

P2PV2AnnounceAddresses contains the addresses the peer will advertise on the network in <host>:<port> form as accepted by net.Dial. The addresses should be reachable by peers of interest.

func (Config) P2PV2AnnounceAddressesRaw

func (c Config) P2PV2AnnounceAddressesRaw() []string

P2PV2AnnounceAddressesRaw returns the raw value passed in

func (Config) P2PV2Bootstrappers

func (c Config) P2PV2Bootstrappers() (locators []ocrtypes.BootstrapperLocator)

P2PV2Bootstrappers returns the default bootstrapper peers for libocr's v2 networking stack

func (Config) P2PV2BootstrappersRaw

func (c Config) P2PV2BootstrappersRaw() []string

P2PV2BootstrappersRaw returns the raw strings for v2 bootstrap peers

func (Config) P2PV2DeltaDial

func (c Config) P2PV2DeltaDial() models.Duration

P2PV2DeltaDial controls how far apart Dial attempts are

func (Config) P2PV2DeltaReconcile

func (c Config) P2PV2DeltaReconcile() models.Duration

P2PV2DeltaReconcile controls how often a Reconcile message is sent to every peer.

func (Config) P2PV2ListenAddresses

func (c Config) P2PV2ListenAddresses() []string

P2PV2ListenAddresses contains the addresses the peer will listen to on the network in <host>:<port> form as accepted by net.Listen, but host and port must be fully specified and cannot be empty.

func (Config) Port

func (c Config) Port() uint16

Port represents the port Chainlink should listen on for client requests.

func (Config) ReaperExpiration

func (c Config) ReaperExpiration() models.Duration

ReaperExpiration represents

func (Config) ReplayFromBlock

func (c Config) ReplayFromBlock() int64

func (Config) RootDir

func (c Config) RootDir() string

RootDir represents the location on the file system where Chainlink should keep its files.

func (Config) SecureCookies

func (c Config) SecureCookies() bool

SecureCookies allows toggling of the secure cookies HTTP flag

func (Config) SessionOptions

func (c Config) SessionOptions() sessions.Options

SessionOptions returns the sesssions.Options struct used to configure the session store.

func (Config) SessionSecret

func (c Config) SessionSecret() ([]byte, error)

SessionSecret returns a sequence of bytes to be used as a private key for session signing or encryption.

func (Config) SessionTimeout

func (c Config) SessionTimeout() models.Duration

SessionTimeout is the maximum duration that a user session can persist without any activity.

func (Config) Set

func (c Config) Set(name string, value interface{})

Set a specific configuration variable

func (Config) SetEthGasPriceDefault

func (c Config) SetEthGasPriceDefault(value *big.Int) error

SetEthGasPriceDefault saves a runtime value for the default gas price for transactions

func (Config) SetLogLevel

func (c Config) SetLogLevel(ctx context.Context, value string) error

SetLogLevel saves a runtime value for the default logger level

func (Config) SetLogSQLStatements

func (c Config) SetLogSQLStatements(ctx context.Context, sqlEnabled bool) error

SetLogSQLStatements saves a runtime value for enabling/disabling logging all SQL statements on the default logger

func (*Config) SetRuntimeStore

func (c *Config) SetRuntimeStore(orm *ORM)

SetRuntimeStore tells the configuration system to use a store for retrieving configuration variables that can be configured at runtime.

func (Config) StatsPusherLogging

func (c Config) StatsPusherLogging() bool

StatsPusherLogging toggles very verbose logging of raw messages for the StatsPusher (also telemetry)

func (Config) TLSCertPath

func (c Config) TLSCertPath() string

TLSCertPath represents the file system location of the TLS certificate Chainlink should use for HTTPS.

func (Config) TLSDir

func (c Config) TLSDir() string

func (Config) TLSHost

func (c Config) TLSHost() string

TLSHost represents the hostname to use for TLS clients. This should match the TLS certificate.

func (Config) TLSKeyPath

func (c Config) TLSKeyPath() string

TLSKeyPath represents the file system location of the TLS key Chainlink should use for HTTPS.

func (Config) TLSPort

func (c Config) TLSPort() uint16

TLSPort represents the port Chainlink should listen on for encrypted client requests.

func (Config) TLSRedirect

func (c Config) TLSRedirect() bool

TLSRedirect forces TLS redirect for unencrypted connections

func (Config) TriggerFallbackDBPollInterval

func (c Config) TriggerFallbackDBPollInterval() time.Duration

func (Config) UnAuthenticatedRateLimit

func (c Config) UnAuthenticatedRateLimit() int64

UnAuthenticatedRateLimit defines the threshold to which requests unauthenticated requests get limited

func (Config) UnAuthenticatedRateLimitPeriod

func (c Config) UnAuthenticatedRateLimitPeriod() models.Duration

UnAuthenticatedRateLimitPeriod defines the period to which unauthenticated requests get limited

func (*Config) Validate

func (c *Config) Validate() error

Validate performs basic sanity checks on config and returns error if any misconfiguration would be fatal to the application

type ConfigSchema

type ConfigSchema struct {
	AdminCredentialsFile                       string                        `env:"ADMIN_CREDENTIALS_FILE" default:"$ROOT/apicredentials"`
	AllowOrigins                               string                        `env:"ALLOW_ORIGINS" default:"http://localhost:3000,http://localhost:6688"`
	AuthenticatedRateLimit                     int64                         `env:"AUTHENTICATED_RATE_LIMIT" default:"1000"`
	AuthenticatedRateLimitPeriod               time.Duration                 `env:"AUTHENTICATED_RATE_LIMIT_PERIOD" default:"1m"`
	BalanceMonitorEnabled                      bool                          `env:"BALANCE_MONITOR_ENABLED" default:"true"`
	BlockBackfillDepth                         uint64                        `env:"BLOCK_BACKFILL_DEPTH" default:"10"`
	BlockBackfillSkip                          bool                          `env:"BLOCK_BACKFILL_SKIP" default:"false"`
	BlockHistoryEstimatorBatchSize             uint32                        `env:"BLOCK_HISTORY_ESTIMATOR_BATCH_SIZE"`
	BlockHistoryEstimatorBlockDelay            uint16                        `env:"BLOCK_HISTORY_ESTIMATOR_BLOCK_DELAY"`
	BlockHistoryEstimatorBlockHistorySize      uint16                        `env:"BLOCK_HISTORY_ESTIMATOR_BLOCK_HISTORY_SIZE"`
	BlockHistoryEstimatorTransactionPercentile uint16                        `env:"BLOCK_HISTORY_ESTIMATOR_TRANSACTION_PERCENTILE" default:"60"`
	BridgeResponseURL                          url.URL                       `env:"BRIDGE_RESPONSE_URL"`
	ChainID                                    big.Int                       `env:"ETH_CHAIN_ID" default:"1"`
	ClientNodeURL                              string                        `env:"CLIENT_NODE_URL" default:"http://localhost:6688"`
	DatabaseBackupDir                          string                        `env:"DATABASE_BACKUP_DIR" default:""`
	DatabaseBackupFrequency                    time.Duration                 `env:"DATABASE_BACKUP_FREQUENCY" default:"1h"`
	DatabaseBackupMode                         string                        `env:"DATABASE_BACKUP_MODE" default:"none"`
	DatabaseBackupURL                          *url.URL                      `env:"DATABASE_BACKUP_URL" default:""`
	DatabaseListenerMaxReconnectDuration       time.Duration                 `env:"DATABASE_LISTENER_MAX_RECONNECT_DURATION" default:"10m"`
	DatabaseListenerMinReconnectInterval       time.Duration                 `env:"DATABASE_LISTENER_MIN_RECONNECT_INTERVAL" default:"1m"`
	DatabaseMaximumTxDuration                  time.Duration                 `env:"DATABASE_MAXIMUM_TX_DURATION" default:"30m"`
	DatabaseTimeout                            models.Duration               `env:"DATABASE_TIMEOUT" default:"0"`
	DatabaseURL                                string                        `env:"DATABASE_URL"`
	DefaultHTTPAllowUnrestrictedNetworkAccess  bool                          `env:"DEFAULT_HTTP_ALLOW_UNRESTRICTED_NETWORK_ACCESS" default:"false"`
	DefaultHTTPLimit                           int64                         `env:"DEFAULT_HTTP_LIMIT" default:"32768"`
	DefaultHTTPTimeout                         models.Duration               `env:"DEFAULT_HTTP_TIMEOUT" default:"15s"`
	DefaultMaxHTTPAttempts                     uint                          `env:"MAX_HTTP_ATTEMPTS" default:"5"`
	Dev                                        bool                          `env:"CHAINLINK_DEV" default:"false"`
	EnableExperimentalAdapters                 bool                          `env:"ENABLE_EXPERIMENTAL_ADAPTERS" default:"false"`
	EnableLegacyJobPipeline                    bool                          `env:"ENABLE_LEGACY_JOB_PIPELINE" default:"true"`
	EthBalanceMonitorBlockDelay                uint16                        `env:"ETH_BALANCE_MONITOR_BLOCK_DELAY"`
	EthFinalityDepth                           uint                          `env:"ETH_FINALITY_DEPTH"`
	EthGasBumpPercent                          uint16                        `env:"ETH_GAS_BUMP_PERCENT" default:"20"`
	EthGasBumpThreshold                        uint64                        `env:"ETH_GAS_BUMP_THRESHOLD"`
	EthGasBumpTxDepth                          uint16                        `env:"ETH_GAS_BUMP_TX_DEPTH" default:"10"`
	EthGasBumpWei                              big.Int                       `env:"ETH_GAS_BUMP_WEI"`
	EthGasLimitDefault                         uint64                        `env:"ETH_GAS_LIMIT_DEFAULT"`
	EthGasLimitMultiplier                      float32                       `env:"ETH_GAS_LIMIT_MULTIPLIER" default:"1.0"`
	EthGasLimitTransfer                        uint64                        `env:"ETH_GAS_LIMIT_TRANSFER"`
	EthGasPriceDefault                         big.Int                       `env:"ETH_GAS_PRICE_DEFAULT"`
	EthHeadTrackerHistoryDepth                 uint                          `env:"ETH_HEAD_TRACKER_HISTORY_DEPTH"`
	EthHeadTrackerMaxBufferSize                uint                          `env:"ETH_HEAD_TRACKER_MAX_BUFFER_SIZE" default:"3"`
	EthHeadTrackerSamplingInterval             time.Duration                 `env:"ETH_HEAD_TRACKER_SAMPLING_INTERVAL" default:"1s"`
	EthLogBackfillBatchSize                    uint32                        `env:"ETH_LOG_BACKFILL_BATCH_SIZE" default:"100"`
	EthMaxGasPriceWei                          big.Int                       `env:"ETH_MAX_GAS_PRICE_WEI"`
	EthMaxInFlightTransactions                 uint64                        `env:"ETH_MAX_IN_FLIGHT_TRANSACTIONS"`
	EthMaxQueuedTransactions                   uint64                        `env:"ETH_MAX_QUEUED_TRANSACTIONS"`
	EthMinGasPriceWei                          big.Int                       `env:"ETH_MIN_GAS_PRICE_WEI"`
	EthNonceAutoSync                           bool                          `env:"ETH_NONCE_AUTO_SYNC" default:"true"`
	EthRPCDefaultBatchSize                     uint32                        `env:"ETH_RPC_DEFAULT_BATCH_SIZE" default:"100"`
	EthTxReaperInterval                        time.Duration                 `env:"ETH_TX_REAPER_INTERVAL" default:"1h"`
	EthTxReaperThreshold                       time.Duration                 `env:"ETH_TX_REAPER_THRESHOLD" default:"168h"`
	EthTxResendAfterThreshold                  time.Duration                 `env:"ETH_TX_RESEND_AFTER_THRESHOLD"`
	EthereumDisabled                           bool                          `env:"ETH_DISABLED" default:"false"`
	EthereumHTTPURL                            string                        `env:"ETH_HTTP_URL"`
	EthereumSecondaryURL                       string                        `env:"ETH_SECONDARY_URL" default:""`
	EthereumSecondaryURLs                      string                        `env:"ETH_SECONDARY_URLS" default:""`
	EthereumURL                                string                        `env:"ETH_URL" default:"ws://localhost:8546"`
	ExplorerAccessKey                          string                        `env:"EXPLORER_ACCESS_KEY"`
	ExplorerSecret                             string                        `env:"EXPLORER_SECRET"`
	ExplorerURL                                *url.URL                      `env:"EXPLORER_URL"`
	FMDefaultTransactionQueueDepth             uint32                        `env:"FM_DEFAULT_TRANSACTION_QUEUE_DEPTH" default:"1"`
	FeatureCronV2                              bool                          `env:"FEATURE_CRON_V2" default:"true"`
	FeatureExternalInitiators                  bool                          `env:"FEATURE_EXTERNAL_INITIATORS" default:"false"`
	FeatureFluxMonitor                         bool                          `env:"FEATURE_FLUX_MONITOR" default:"true"`
	FeatureFluxMonitorV2                       bool                          `env:"FEATURE_FLUX_MONITOR_V2" default:"true"`
	FeatureOffchainReporting                   bool                          `env:"FEATURE_OFFCHAIN_REPORTING" default:"false"`
	FeatureWebhookV2                           bool                          `env:"FEATURE_WEBHOOK_V2" default:"false"`
	FlagsContractAddress                       string                        `env:"FLAGS_CONTRACT_ADDRESS"`
	GasEstimatorMode                           string                        `env:"GAS_ESTIMATOR_MODE"`
	GasUpdaterBatchSize                        uint32                        `env:"GAS_UPDATER_BATCH_SIZE"`
	GasUpdaterBlockDelay                       uint16                        `env:"GAS_UPDATER_BLOCK_DELAY"`
	GasUpdaterBlockHistorySize                 uint16                        `env:"GAS_UPDATER_BLOCK_HISTORY_SIZE"`
	GasUpdaterEnabled                          bool                          `env:"GAS_UPDATER_ENABLED"`
	GasUpdaterTransactionPercentile            uint16                        `env:"GAS_UPDATER_TRANSACTION_PERCENTILE" default:"60"`
	GlobalLockRetryInterval                    models.Duration               `env:"GLOBAL_LOCK_RETRY_INTERVAL" default:"1s"`
	HTTPServerWriteTimeout                     time.Duration                 `env:"HTTP_SERVER_WRITE_TIMEOUT" default:"10s"`
	InsecureFastScrypt                         bool                          `env:"INSECURE_FAST_SCRYPT" default:"false"`
	InsecureSkipVerify                         bool                          `env:"INSECURE_SKIP_VERIFY" default:"false"`
	JSONConsole                                bool                          `env:"JSON_CONSOLE" default:"false"`
	JobPipelineMaxRunDuration                  time.Duration                 `env:"JOB_PIPELINE_MAX_RUN_DURATION" default:"10m"`
	JobPipelineReaperInterval                  time.Duration                 `env:"JOB_PIPELINE_REAPER_INTERVAL" default:"1h"`
	JobPipelineReaperThreshold                 time.Duration                 `env:"JOB_PIPELINE_REAPER_THRESHOLD" default:"24h"`
	JobPipelineResultWriteQueueDepth           uint64                        `env:"JOB_PIPELINE_RESULT_WRITE_QUEUE_DEPTH" default:"100"`
	KeeperDefaultTransactionQueueDepth         uint32                        `env:"KEEPER_DEFAULT_TRANSACTION_QUEUE_DEPTH" default:"1"`
	KeeperMaximumGracePeriod                   int64                         `env:"KEEPER_MAXIMUM_GRACE_PERIOD" default:"100"`
	KeeperMinimumRequiredConfirmations         uint64                        `env:"KEEPER_MINIMUM_REQUIRED_CONFIRMATIONS" default:"12"`
	KeeperRegistryCheckGasOverhead             uint64                        `env:"KEEPER_REGISTRY_CHECK_GAS_OVERHEAD" default:"200000"`
	KeeperRegistryPerformGasOverhead           uint64                        `env:"KEEPER_REGISTRY_PERFORM_GAS_OVERHEAD" default:"150000"`
	KeeperRegistrySyncInterval                 time.Duration                 `env:"KEEPER_REGISTRY_SYNC_INTERVAL" default:"30m"`
	LinkContractAddress                        string                        `env:"LINK_CONTRACT_ADDRESS"`
	LogLevel                                   LogLevel                      `env:"LOG_LEVEL" default:"info"`
	LogSQLMigrations                           bool                          `env:"LOG_SQL_MIGRATIONS" default:"true"`
	LogSQLStatements                           bool                          `env:"LOG_SQL" default:"false"`
	LogToDisk                                  bool                          `env:"LOG_TO_DISK" default:"true"`
	MaximumServiceDuration                     models.Duration               `env:"MAXIMUM_SERVICE_DURATION" default:"8760h" `
	MigrateDatabase                            bool                          `env:"MIGRATE_DATABASE" default:"true"`
	MinIncomingConfirmations                   uint32                        `env:"MIN_INCOMING_CONFIRMATIONS"`
	MinRequiredOutgoingConfirmations           uint64                        `env:"MIN_OUTGOING_CONFIRMATIONS"`
	MinimumContractPayment                     assets.Link                   `env:"MINIMUM_CONTRACT_PAYMENT_LINK_JUELS"`
	MinimumRequestExpiration                   uint64                        `env:"MINIMUM_REQUEST_EXPIRATION" default:"300"`
	MinimumServiceDuration                     models.Duration               `env:"MINIMUM_SERVICE_DURATION" default:"0s" `
	OCRBlockchainTimeout                       time.Duration                 `env:"OCR_BLOCKCHAIN_TIMEOUT" default:"20s"`
	OCRBootstrapCheckInterval                  time.Duration                 `env:"OCR_BOOTSTRAP_CHECK_INTERVAL" default:"20s"`
	OCRContractConfirmations                   uint                          `env:"OCR_CONTRACT_CONFIRMATIONS"`
	OCRContractPollInterval                    time.Duration                 `env:"OCR_CONTRACT_POLL_INTERVAL" default:"1m"`
	OCRContractSubscribeInterval               time.Duration                 `env:"OCR_CONTRACT_SUBSCRIBE_INTERVAL" default:"2m"`
	OCRContractTransmitterTransmitTimeout      time.Duration                 `env:"OCR_CONTRACT_TRANSMITTER_TRANSMIT_TIMEOUT" default:"10s"`
	OCRDHTLookupInterval                       int                           `env:"OCR_DHT_LOOKUP_INTERVAL" default:"10"`
	OCRDatabaseTimeout                         time.Duration                 `env:"OCR_DATABASE_TIMEOUT" default:"10s"`
	OCRDefaultTransactionQueueDepth            uint32                        `env:"OCR_DEFAULT_TRANSACTION_QUEUE_DEPTH" default:"1"`
	OCRIncomingMessageBufferSize               int                           `env:"OCR_INCOMING_MESSAGE_BUFFER_SIZE" default:"10"`
	OCRKeyBundleID                             string                        `env:"OCR_KEY_BUNDLE_ID"`
	OCRMonitoringEndpoint                      string                        `env:"OCR_MONITORING_ENDPOINT"`
	OCRNewStreamTimeout                        time.Duration                 `env:"OCR_NEW_STREAM_TIMEOUT" default:"10s"`
	OCRObservationGracePeriod                  time.Duration                 `env:"OCR_OBSERVATION_GRACE_PERIOD" default:"1s"`
	OCRObservationTimeout                      time.Duration                 `env:"OCR_OBSERVATION_TIMEOUT" default:"12s"`
	OCROutgoingMessageBufferSize               int                           `env:"OCR_OUTGOING_MESSAGE_BUFFER_SIZE" default:"10"`
	OCRTraceLogging                            bool                          `env:"OCR_TRACE_LOGGING" default:"false"`
	OCRTransmitterAddress                      string                        `env:"OCR_TRANSMITTER_ADDRESS"`
	ORMMaxIdleConns                            int                           `env:"ORM_MAX_IDLE_CONNS" default:"10"`
	ORMMaxOpenConns                            int                           `env:"ORM_MAX_OPEN_CONNS" default:"20"`
	OperatorContractAddress                    common.Address                `env:"OPERATOR_CONTRACT_ADDRESS"`
	P2PAnnounceIP                              net.IP                        `env:"P2P_ANNOUNCE_IP"`
	P2PAnnouncePort                            uint16                        `env:"P2P_ANNOUNCE_PORT"`
	P2PBootstrapPeers                          []string                      `env:"P2P_BOOTSTRAP_PEERS"`
	P2PDHTAnnouncementCounterUserPrefix        uint32                        `env:"P2P_DHT_ANNOUNCEMENT_COUNTER_USER_PREFIX" default:"0"`
	P2PListenIP                                net.IP                        `env:"P2P_LISTEN_IP" default:"0.0.0.0"`
	P2PListenPort                              uint16                        `env:"P2P_LISTEN_PORT"`
	P2PNetworkingStack                         ocrnetworking.NetworkingStack `env:"P2P_NETWORKING_STACK" default:"V1"`
	P2PPeerID                                  p2pkey.PeerID                 `env:"P2P_PEER_ID"`
	P2PPeerstoreWriteInterval                  time.Duration                 `env:"P2P_PEERSTORE_WRITE_INTERVAL" default:"5m"`
	P2PV2AnnounceAddresses                     []string                      `env:"P2PV2_ANNOUNCE_ADDRESSES"`
	P2PV2Bootstrappers                         []string                      `env:"P2PV2_BOOTSTRAPPERS"`
	P2PV2DeltaDial                             models.Duration               `env:"P2PV2_DELTA_DIAL" default:"15s"`
	P2PV2DeltaReconcile                        models.Duration               `env:"P2PV2_DELTA_RECONCILE" default:"1m"`
	P2PV2ListenAddresses                       []string                      `env:"P2PV2_LISTEN_ADDRESSES"`
	Port                                       uint16                        `env:"CHAINLINK_PORT" default:"6688"`
	ReaperExpiration                           models.Duration               `env:"REAPER_EXPIRATION" default:"240h"`
	ReplayFromBlock                            int64                         `env:"REPLAY_FROM_BLOCK" default:"-1"`
	RootDir                                    string                        `env:"ROOT" default:"~/.chainlink"`
	SecureCookies                              bool                          `env:"SECURE_COOKIES" default:"true"`
	SessionTimeout                             models.Duration               `env:"SESSION_TIMEOUT" default:"15m"`
	StatsPusherLogging                         string                        `env:"STATS_PUSHER_LOGGING" default:"false"`
	TLSCertPath                                string                        `env:"TLS_CERT_PATH" `
	TLSHost                                    string                        `env:"CHAINLINK_TLS_HOST" `
	TLSKeyPath                                 string                        `env:"TLS_KEY_PATH" `
	TLSPort                                    uint16                        `env:"CHAINLINK_TLS_PORT" default:"6689"`
	TLSRedirect                                bool                          `env:"CHAINLINK_TLS_REDIRECT" default:"false"`
	TriggerFallbackDBPollInterval              time.Duration                 `env:"TRIGGER_FALLBACK_DB_POLL_INTERVAL" default:"30s"`
	UnAuthenticatedRateLimit                   int64                         `env:"UNAUTHENTICATED_RATE_LIMIT" default:"5"`
	UnAuthenticatedRateLimitPeriod             time.Duration                 `env:"UNAUTHENTICATED_RATE_LIMIT_PERIOD" default:"20s"`
}

ConfigSchema records the schema of configuration at the type level

type DatabaseBackupMode

type DatabaseBackupMode string
var (
	DatabaseBackupModeNone DatabaseBackupMode = "none"
	DatabaseBackupModeLite DatabaseBackupMode = "lite"
	DatabaseBackupModeFull DatabaseBackupMode = "full"
)

type LogLevel

type LogLevel struct {
	zapcore.Level
}

LogLevel determines the verbosity of the events to be logged.

type ORM

type ORM struct {
	// contains filtered or unexported fields
}

func NewORM

func NewORM(db *gorm.DB) *ORM

func (*ORM) GetConfigBoolValue

func (orm *ORM) GetConfigBoolValue(field string) (*bool, error)

GetConfigBoolValue returns a boolean value for a named configuration entry

func (*ORM) GetConfigValue

func (orm *ORM) GetConfigValue(field string, value encoding.TextUnmarshaler) error

GetConfigValue returns the value for a named configuration entry

func (*ORM) SetConfigStrValue

func (orm *ORM) SetConfigStrValue(ctx context.Context, field string, value string) error

SetConfigValue returns the value for a named configuration entry

func (*ORM) SetConfigValue

func (orm *ORM) SetConfigValue(field string, value encoding.TextMarshaler) error

SetConfigValue returns the value for a named configuration entry

type SecretGenerator

type SecretGenerator interface {
	Generate(Config) ([]byte, error)
}

SecretGenerator is the interface for objects that generate a secret used to sign or encrypt.

Jump to

Keyboard shortcuts

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