config

package
v1.10.17 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2021 License: MIT Imports: 37 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")
	DefaultLogLevel = LogLevel{zapcore.InfoLevel}
)

Functions

func EnvVarName

func EnvVarName(field string) string

EnvVarName gets the environment variable name for a config schema field

func ParseAddress added in v1.10.17

func ParseAddress(str string) (interface{}, error)

func ParseBigInt added in v1.10.17

func ParseBigInt(str string) (interface{}, error)

func ParseBool added in v1.10.17

func ParseBool(s string) (interface{}, error)

func ParseDuration added in v1.10.17

func ParseDuration(s string) (interface{}, error)

func ParseF32 added in v1.10.17

func ParseF32(s string) (interface{}, error)

func ParseHomeDir added in v1.10.17

func ParseHomeDir(str string) (interface{}, error)

func ParseIP added in v1.10.17

func ParseIP(s string) (interface{}, error)
func ParseLink(str string) (interface{}, error)

func ParseLogLevel added in v1.10.17

func ParseLogLevel(str string) (interface{}, error)

func ParseString added in v1.10.17

func ParseString(str string) (interface{}, error)

func ParseURL added in v1.10.17

func ParseURL(s string) (interface{}, error)

func ParseUint16 added in v1.10.17

func ParseUint16(s string) (interface{}, error)

func ParseUint32 added in v1.10.17

func ParseUint32(s string) (interface{}, error)

func ParseUint64 added in v1.10.17

func ParseUint64(s string) (interface{}, error)

func TryEnvVarName added in v1.10.17

func TryEnvVarName(field string) string

Types

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"`
	BlockBackfillDepth                         uint64                        `env:"BLOCK_BACKFILL_DEPTH" default:"10"`
	BlockBackfillSkip                          bool                          `env:"BLOCK_BACKFILL_SKIP" default:"false"`
	BlockEmissionIdleWarningThreshold          time.Duration                 `env:"BLOCK_EMISSION_IDLE_WARNING_THRESHOLD"`
	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"`
	BridgeResponseURL                          url.URL                       `env:"BRIDGE_RESPONSE_URL"`
	ChainType                                  string                        `env:"CHAIN_TYPE"`
	ClientNodeURL                              string                        `env:"CLIENT_NODE_URL" default:"http://localhost:6688"`
	UseLegacyEthEnvVars                        bool                          `env:"USE_LEGACY_ETH_ENV_VARS" default:"true"`
	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"`
	DefaultChainID                             *big.Int                      `env:"ETH_CHAIN_ID"`
	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"`
	EVMDisabled                                bool                          `env:"EVM_DISABLED" default:"false"`
	EthTxReaperInterval                        time.Duration                 `env:"ETH_TX_REAPER_INTERVAL"`
	EthTxReaperThreshold                       time.Duration                 `env:"ETH_TX_REAPER_THRESHOLD"`
	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"`
	EvmDefaultBatchSize                        uint32                        `env:"ETH_DEFAULT_BATCH_SIZE"`
	EvmEIP1559DynamicFees                      bool                          `env:"EVM_EIP1559_DYNAMIC_FEES"`
	EvmFinalityDepth                           uint32                        `env:"ETH_FINALITY_DEPTH"`
	EvmGasBumpPercent                          uint16                        `env:"ETH_GAS_BUMP_PERCENT"`
	EvmGasBumpThreshold                        uint64                        `env:"ETH_GAS_BUMP_THRESHOLD"`
	EvmGasBumpTxDepth                          uint16                        `env:"ETH_GAS_BUMP_TX_DEPTH"`
	EvmGasBumpWei                              *big.Int                      `env:"ETH_GAS_BUMP_WEI"`
	EvmGasLimitDefault                         uint64                        `env:"ETH_GAS_LIMIT_DEFAULT"`
	EvmGasLimitMultiplier                      float32                       `env:"ETH_GAS_LIMIT_MULTIPLIER"`
	EvmGasLimitTransfer                        uint64                        `env:"ETH_GAS_LIMIT_TRANSFER"`
	EvmGasPriceDefault                         *big.Int                      `env:"ETH_GAS_PRICE_DEFAULT"`
	EvmGasTipCapDefault                        *big.Int                      `env:"EVM_GAS_TIP_CAP_DEFAULT"`
	EvmGasTipCapMinimum                        *big.Int                      `env:"EVM_GAS_TIP_CAP_MINIMUM"`
	EvmHeadTrackerHistoryDepth                 uint                          `env:"ETH_HEAD_TRACKER_HISTORY_DEPTH"`
	EvmHeadTrackerMaxBufferSize                uint                          `env:"ETH_HEAD_TRACKER_MAX_BUFFER_SIZE"`
	EvmHeadTrackerSamplingInterval             time.Duration                 `env:"ETH_HEAD_TRACKER_SAMPLING_INTERVAL"`
	EvmLogBackfillBatchSize                    uint32                        `env:"ETH_LOG_BACKFILL_BATCH_SIZE"`
	EvmMaxGasPriceWei                          *big.Int                      `env:"ETH_MAX_GAS_PRICE_WEI"`
	EvmMaxInFlightTransactions                 uint32                        `env:"ETH_MAX_IN_FLIGHT_TRANSACTIONS"`
	EvmMaxQueuedTransactions                   uint64                        `env:"ETH_MAX_QUEUED_TRANSACTIONS"`
	EvmMinGasPriceWei                          *big.Int                      `env:"ETH_MIN_GAS_PRICE_WEI"`
	EvmNonceAutoSync                           bool                          `env:"ETH_NONCE_AUTO_SYNC"`
	EvmRPCDefaultBatchSize                     uint32                        `env:"ETH_RPC_DEFAULT_BATCH_SIZE"`
	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"`
	FMSimulateTransactions                     bool                          `env:"FM_SIMULATE_TRANSACTIONS" default:"false"`
	FeatureExternalInitiators                  bool                          `env:"FEATURE_EXTERNAL_INITIATORS" default:"false"`
	FeatureOffchainReporting                   bool                          `env:"FEATURE_OFFCHAIN_REPORTING" default:"false"`
	FeatureUICSAKeys                           bool                          `env:"FEATURE_UI_CSA_KEYS" default:"false"`
	FeatureUIFeedsManager                      bool                          `env:"FEATURE_UI_FEEDS_MANAGER" default:"false"`
	FlagsContractAddress                       string                        `env:"FLAGS_CONTRACT_ADDRESS"`
	GasEstimatorMode                           string                        `env:"GAS_ESTIMATOR_MODE"`
	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"`
	KeeperGasPriceBufferPercent                uint32                        `env:"KEEPER_GAS_PRICE_BUFFER_PERCENT" default:"20"`
	KeeperGasTipCapBufferPercent               uint32                        `env:"KEEPER_GAS_TIP_CAP_BUFFER_PERCENT" default:"20"`
	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"`
	KeeperRegistrySyncUpkeepQueueSize          uint32                        `env:"KEEPER_REGISTRY_SYNC_UPKEEP_QUEUE_SIZE" default:"10"`
	LinkContractAddress                        string                        `env:"LINK_CONTRACT_ADDRESS"`
	LogLevel                                   LogLevel                      `env:"LOG_LEVEL"`
	LogSQLMigrations                           bool                          `env:"LOG_SQL_MIGRATIONS" default:"true"`
	LogSQLStatements                           bool                          `env:"LOG_SQL" default:"false"`
	LogToDisk                                  bool                          `env:"LOG_TO_DISK" default:"false"`
	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"`
	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"`
	OCRSimulateTransactions                    bool                          `env:"OCR_SIMULATE_TRANSACTIONS" default:"false"`
	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"`
	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"`
	RPID                                       string                        `env:"MFA_RPID"`
	RPOrigin                                   string                        `env:"MFA_RPORIGIN"`
	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"`
	TelemetryIngressLogging                    bool                          `env:"TELEMETRY_INGRESS_LOGGING" default:"false"`
	TelemetryIngressServerPubKey               string                        `env:"TELEMETRY_INGRESS_SERVER_PUB_KEY"`
	TelemetryIngressURL                        *url.URL                      `env:"TELEMETRY_INGRESS_URL"`
	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 FilePersistedSecretGenerator added in v1.10.17

type FilePersistedSecretGenerator struct{}

func (FilePersistedSecretGenerator) Generate added in v1.10.17

func (f FilePersistedSecretGenerator) Generate(rootDir string) ([]byte, error)

type GeneralConfig added in v1.10.17

type GeneralConfig interface {
	GeneralOnlyConfig
	GlobalConfig
}

func NewGeneralConfig added in v1.10.17

func NewGeneralConfig() GeneralConfig

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

type GeneralOnlyConfig added in v1.10.17

type GeneralOnlyConfig interface {
	AdminCredentialsFile() string
	AllowOrigins() string
	AuthenticatedRateLimit() int64
	AuthenticatedRateLimitPeriod() models.Duration
	BlockBackfillDepth() uint64
	BlockBackfillSkip() bool
	BridgeResponseURL() *url.URL
	CertFile() string
	ClientNodeURL() string
	UseLegacyEthEnvVars() bool
	DatabaseBackupDir() string
	DatabaseBackupFrequency() time.Duration
	DatabaseBackupMode() DatabaseBackupMode
	DatabaseBackupURL() *url.URL
	DatabaseListenerMaxReconnectDuration() time.Duration
	DatabaseListenerMinReconnectInterval() time.Duration
	DefaultChainID() *big.Int
	HTTPServerWriteTimeout() time.Duration
	DatabaseMaximumTxDuration() time.Duration
	DatabaseTimeout() models.Duration
	DatabaseURL() url.URL
	DefaultHTTPAllowUnrestrictedNetworkAccess() bool
	DefaultHTTPLimit() int64
	DefaultHTTPTimeout() models.Duration
	DefaultMaxHTTPAttempts() uint
	Dev() bool
	EthereumDisabled() bool
	EthereumHTTPURL() *url.URL
	EthereumSecondaryURLs() []url.URL
	EthereumURL() string
	EVMDisabled() bool
	ExplorerAccessKey() string
	ExplorerSecret() string
	ExplorerURL() *url.URL
	FMDefaultTransactionQueueDepth() uint32
	FMSimulateTransactions() bool
	FeatureUICSAKeys() bool
	FeatureUIFeedsManager() bool
	FeatureExternalInitiators() bool
	FeatureOffchainReporting() bool
	GetAdvisoryLockIDConfiguredOrDefault() int64
	GetDatabaseDialectConfiguredOrDefault() dialects.DialectName
	GlobalLockRetryInterval() models.Duration
	InsecureFastScrypt() bool
	InsecureSkipVerify() bool
	JSONConsole() bool
	JobPipelineMaxRunDuration() time.Duration
	JobPipelineReaperInterval() time.Duration
	JobPipelineReaperThreshold() time.Duration
	JobPipelineResultWriteQueueDepth() uint64
	KeeperDefaultTransactionQueueDepth() uint32
	KeeperGasPriceBufferPercent() uint32
	KeeperGasTipCapBufferPercent() uint32
	KeeperMaximumGracePeriod() int64
	KeeperMinimumRequiredConfirmations() uint64
	KeeperRegistryCheckGasOverhead() uint64
	KeeperRegistryPerformGasOverhead() uint64
	KeeperRegistrySyncInterval() time.Duration
	KeeperRegistrySyncUpkeepQueueSize() uint32
	KeyFile() string
	LogLevel() zapcore.Level
	LogSQLMigrations() bool
	LogSQLStatements() bool
	LogToDisk() bool
	MigrateDatabase() bool
	OCRBlockchainTimeout() time.Duration
	OCRBootstrapCheckInterval() time.Duration
	OCRContractPollInterval() time.Duration
	OCRContractSubscribeInterval() time.Duration
	OCRContractTransmitterTransmitTimeout() time.Duration
	OCRDHTLookupInterval() int
	OCRDatabaseTimeout() time.Duration
	OCRDefaultTransactionQueueDepth() uint32
	OCRIncomingMessageBufferSize() int
	OCRKeyBundleID() (string, error)
	OCRMonitoringEndpoint() string
	OCRNewStreamTimeout() time.Duration
	OCRObservationGracePeriod() time.Duration
	OCRObservationTimeout() time.Duration
	OCROutgoingMessageBufferSize() int
	OCRSimulateTransactions() bool
	OCRTraceLogging() bool
	OCRTransmitterAddress() (ethkey.EIP55Address, error)
	ORMMaxIdleConns() int
	ORMMaxOpenConns() int
	P2PAnnounceIP() net.IP
	P2PAnnouncePort() uint16
	P2PBootstrapPeers() ([]string, error)
	P2PDHTAnnouncementCounterUserPrefix() uint32
	P2PListenIP() net.IP
	P2PListenPort() uint16
	P2PListenPortRaw() string
	P2PNetworkingStack() (n ocrnetworking.NetworkingStack)
	P2PNetworkingStackRaw() string
	P2PPeerID() p2pkey.PeerID
	P2PPeerIDRaw() string
	P2PPeerstoreWriteInterval() time.Duration
	P2PV2AnnounceAddresses() []string
	P2PV2AnnounceAddressesRaw() []string
	P2PV2Bootstrappers() (locators []ocrtypes.BootstrapperLocator)
	P2PV2BootstrappersRaw() []string
	P2PV2DeltaDial() models.Duration
	P2PV2DeltaReconcile() models.Duration
	P2PV2ListenAddresses() []string
	Port() uint16
	ReaperExpiration() models.Duration
	ReplayFromBlock() int64
	RootDir() string
	RPID() string
	RPOrigin() string
	SecureCookies() bool
	SessionOptions() sessions.Options
	SessionSecret() ([]byte, error)
	SessionTimeout() models.Duration
	SetDB(*gorm.DB)
	SetLogLevel(ctx context.Context, lvl zapcore.Level) error
	SetLogSQLStatements(ctx context.Context, sqlEnabled bool) error
	SetDialect(dialects.DialectName)
	StatsPusherLogging() bool
	TelemetryIngressLogging() bool
	TelemetryIngressServerPubKey() string
	TelemetryIngressURL() *url.URL
	TLSCertPath() string
	TLSDir() string
	TLSHost() string
	TLSKeyPath() string
	TLSPort() uint16
	TLSRedirect() bool
	TriggerFallbackDBPollInterval() time.Duration
	UnAuthenticatedRateLimit() int64
	UnAuthenticatedRateLimitPeriod() models.Duration
	Validate() error
}

type GlobalConfig added in v1.10.17

type GlobalConfig interface {
	GlobalBalanceMonitorEnabled() (bool, bool)
	GlobalBlockEmissionIdleWarningThreshold() (time.Duration, bool)
	GlobalBlockHistoryEstimatorBatchSize() (uint32, bool)
	GlobalBlockHistoryEstimatorBlockDelay() (uint16, bool)
	GlobalBlockHistoryEstimatorBlockHistorySize() (uint16, bool)
	GlobalBlockHistoryEstimatorTransactionPercentile() (uint16, bool)
	GlobalEthTxReaperInterval() (time.Duration, bool)
	GlobalEthTxReaperThreshold() (time.Duration, bool)
	GlobalEthTxResendAfterThreshold() (time.Duration, bool)
	GlobalEvmDefaultBatchSize() (uint32, bool)
	GlobalEvmEIP1559DynamicFees() (bool, bool)
	GlobalEvmFinalityDepth() (uint32, bool)
	GlobalEvmGasBumpPercent() (uint16, bool)
	GlobalEvmGasBumpThreshold() (uint64, bool)
	GlobalEvmGasBumpTxDepth() (uint16, bool)
	GlobalEvmGasBumpWei() (*big.Int, bool)
	GlobalEvmGasLimitDefault() (uint64, bool)
	GlobalEvmGasLimitMultiplier() (float32, bool)
	GlobalEvmGasLimitTransfer() (uint64, bool)
	GlobalEvmGasPriceDefault() (*big.Int, bool)
	GlobalEvmGasTipCapDefault() (*big.Int, bool)
	GlobalEvmGasTipCapMinimum() (*big.Int, bool)
	GlobalEvmHeadTrackerHistoryDepth() (uint32, bool)
	GlobalEvmHeadTrackerMaxBufferSize() (uint32, bool)
	GlobalEvmHeadTrackerSamplingInterval() (time.Duration, bool)
	GlobalEvmLogBackfillBatchSize() (uint32, bool)
	GlobalEvmMaxGasPriceWei() (*big.Int, bool)
	GlobalEvmMaxInFlightTransactions() (uint32, bool)
	GlobalEvmMaxQueuedTransactions() (uint64, bool)
	GlobalEvmMinGasPriceWei() (*big.Int, bool)
	GlobalEvmNonceAutoSync() (bool, bool)
	GlobalEvmRPCDefaultBatchSize() (uint32, bool)
	GlobalFlagsContractAddress() (string, bool)
	GlobalGasEstimatorMode() (string, bool)
	GlobalChainType() (string, bool)
	GlobalLinkContractAddress() (string, bool)
	GlobalMinIncomingConfirmations() (uint32, bool)
	GlobalMinRequiredOutgoingConfirmations() (uint64, bool)
	GlobalMinimumContractPayment() (*assets.Link, bool)
	GlobalOCRContractConfirmations() (uint16, bool)
}

GlobalConfig holds global ENV overrides for EVM chains If set the global ENV will override everything The second bool indicates if it is set or not

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(string) ([]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