Documentation ¶
Index ¶
- Variables
- func DecodeTOML(r io.Reader, v any) error
- func Validate(cfg interface{}) (err error)
- type AutoPprof
- type Core
- type Database
- type DatabaseBackup
- type DatabaseListener
- type DatabaseLock
- type DatabaseSecrets
- type Env
- type EnvSecret
- type ErrEmpty
- type ErrInvalid
- type ErrMissing
- type ExplorerSecrets
- type Feature
- type FluxMonitor
- type JobPipeline
- type JobPipelineHTTPRequest
- type Keeper
- type KeeperRegistry
- type Log
- type LogFile
- type LogLevel
- type OCR
- type OCR2
- type P2P
- type P2PV1
- type P2PV2
- type Passwords
- type PrometheusSecrets
- type Pyroscope
- type PyroscopeSecrets
- type Secrets
- type Sentry
- type TelemetryIngress
- type UniqueStrings
- type Validated
- type WebServer
- type WebServerMFA
- type WebServerRateLimit
- type WebServerTLS
Constants ¶
This section is empty.
Variables ¶
View Source
var ( EnvConfig = Env("CL_CONFIG") EnvDev = Env("CL_DEV") EnvDatabaseAllowSimplePasswords = Env("CL_DATABASE_ALLOW_SIMPLE_PASSWORDS") EnvDatabaseURL = EnvSecret("CL_DATABASE_URL") EnvDatabaseBackupURL = EnvSecret("CL_DATABASE_BACKUP_URL") EnvExplorerAccessKey = EnvSecret("CL_EXPLORER_ACCESS_KEY") EnvExplorerSecret = EnvSecret("CL_EXPLORER_SECRET") EnvPasswordKeystore = EnvSecret("CL_PASSWORD_KEYSTORE") EnvPasswordVRF = EnvSecret("CL_PASSWORD_VRF") EnvPyroscopeAuthToken = EnvSecret("CL_PYROSCOPE_AUTH_TOKEN") EnvPrometheusAuthToken = EnvSecret("CL_PROMETHEUS_AUTH_TOKEN") )
View Source
var ErrUnsupported = errors.New("unsupported with config v2")
Functions ¶
func DecodeTOML ¶
DecodeTOML decodes toml from r in to v. Requires strict field matches and returns full toml.StrictMissingError details.
Types ¶
type AutoPprof ¶
type AutoPprof struct { Enabled *bool ProfileRoot *string PollInterval *models.Duration GatherDuration *models.Duration GatherTraceDuration *models.Duration MaxProfileSize *utils.FileSize CPUProfileRate *int64 // runtime.SetCPUProfileRate MemProfileRate *int64 // runtime.MemProfileRate BlockProfileRate *int64 // runtime.SetBlockProfileRate MutexProfileFraction *int64 // runtime.SetMutexProfileFraction MemThreshold *utils.FileSize GoroutineThreshold *int64 }
type Core ¶
type Core struct { // General/misc AppID uuid.UUID `toml:"-"` // random or test DevMode bool `toml:"-"` // from environment ExplorerURL *models.URL InsecureFastScrypt *bool RootDir *string ShutdownGracePeriod *models.Duration Feature Feature `toml:",omitempty"` Database Database `toml:",omitempty"` TelemetryIngress TelemetryIngress `toml:",omitempty"` AuditLogger audit.AuditLoggerConfig `toml:",omitempty"` Log Log `toml:",omitempty"` WebServer WebServer `toml:",omitempty"` JobPipeline JobPipeline `toml:",omitempty"` FluxMonitor FluxMonitor `toml:",omitempty"` OCR2 OCR2 `toml:",omitempty"` OCR OCR `toml:",omitempty"` P2P P2P `toml:",omitempty"` Keeper Keeper `toml:",omitempty"` AutoPprof AutoPprof `toml:",omitempty"` Pyroscope Pyroscope `toml:",omitempty"` Sentry Sentry `toml:",omitempty"` }
Core holds the core configuration. See chainlink.Config for more information.
func CoreDefaults ¶
func CoreDefaults() (c Core)
type Database ¶
type Database struct { DefaultIdleInTxSessionTimeout *models.Duration DefaultLockTimeout *models.Duration DefaultQueryTimeout *models.Duration Dialect dialects.DialectName `toml:"-"` LogQueries *bool MaxIdleConns *int64 MaxOpenConns *int64 MigrateOnStartup *bool Backup DatabaseBackup `toml:",omitempty"` Listener DatabaseListener `toml:",omitempty"` Lock DatabaseLock `toml:",omitempty"` }
func (*Database) LockingMode ¶
type DatabaseBackup ¶
type DatabaseBackup struct { Dir *string Frequency *models.Duration Mode *config.DatabaseBackupMode OnVersionUpgrade *bool }
DatabaseBackup
Note: url is stored in Secrets.DatabaseBackupURL
type DatabaseListener ¶
type DatabaseLock ¶
type DatabaseLock struct { Enabled *bool LeaseDuration *models.Duration LeaseRefreshInterval *models.Duration }
func (*DatabaseLock) ValidateConfig ¶
func (l *DatabaseLock) ValidateConfig() (err error)
type DatabaseSecrets ¶
type DatabaseSecrets struct { URL *models.SecretURL BackupURL *models.SecretURL AllowSimplePasswords bool }
func (*DatabaseSecrets) ValidateConfig ¶
func (d *DatabaseSecrets) ValidateConfig() (err error)
type ErrInvalid ¶
func NewErrDuplicate ¶
func NewErrDuplicate(name string, value any) ErrInvalid
NewErrDuplicate returns an ErrInvalid with a standard duplicate message.
func (ErrInvalid) Error ¶
func (e ErrInvalid) Error() string
type ErrMissing ¶
func (ErrMissing) Error ¶
func (e ErrMissing) Error() string
type ExplorerSecrets ¶
type FluxMonitor ¶
type JobPipeline ¶
type JobPipelineHTTPRequest ¶
type KeeperRegistry ¶
type LogLevel ¶
LogLevel replaces dpanic with crit/CRIT
func (LogLevel) CapitalString ¶
func (LogLevel) MarshalText ¶
func (*LogLevel) UnmarshalText ¶
type OCR ¶
type OCR struct { Enabled *bool ObservationTimeout *models.Duration BlockchainTimeout *models.Duration ContractPollInterval *models.Duration ContractSubscribeInterval *models.Duration DefaultTransactionQueueDepth *uint32 // Optional KeyBundleID *models.Sha256Hash SimulateTransactions *bool TransmitterAddress *ethkey.EIP55Address CaptureEATelemetry *bool }
type OCR2 ¶
type OCR2 struct { Enabled *bool ContractConfirmations *uint32 BlockchainTimeout *models.Duration ContractPollInterval *models.Duration ContractSubscribeInterval *models.Duration ContractTransmitterTransmitTimeout *models.Duration DatabaseTimeout *models.Duration KeyBundleID *models.Sha256Hash CaptureEATelemetry *bool }
type P2P ¶
type P2P struct { IncomingMessageBufferSize *int64 OutgoingMessageBufferSize *int64 PeerID *p2pkey.PeerID TraceLogging *bool V1 P2PV1 `toml:",omitempty"` V2 P2PV2 `toml:",omitempty"` }
func (*P2P) NetworkStack ¶
func (p *P2P) NetworkStack() ocrnetworking.NetworkingStack
type P2PV1 ¶
type P2PV1 struct { Enabled *bool AnnounceIP *net.IP AnnouncePort *uint16 BootstrapCheckInterval *models.Duration DefaultBootstrapPeers *[]string DHTAnnouncementCounterUserPrefix *uint32 DHTLookupInterval *int64 ListenIP *net.IP ListenPort *uint16 NewStreamTimeout *models.Duration PeerstoreWriteInterval *models.Duration }
func (*P2PV1) ValidateConfig ¶
type P2PV2 ¶
type P2PV2 struct { Enabled *bool AnnounceAddresses *[]string DefaultBootstrappers *[]ocrcommontypes.BootstrapperLocator DeltaDial *models.Duration DeltaReconcile *models.Duration ListenAddresses *[]string }
type Passwords ¶
func (*Passwords) ValidateConfig ¶
type PrometheusSecrets ¶
type PyroscopeSecrets ¶
type Secrets ¶
type Secrets struct { Database DatabaseSecrets `toml:",omitempty"` Explorer ExplorerSecrets `toml:",omitempty"` Password Passwords `toml:",omitempty"` Pyroscope PyroscopeSecrets `toml:",omitempty"` Prometheus PrometheusSecrets `toml:",omitempty"` }
type TelemetryIngress ¶
type UniqueStrings ¶
type UniqueStrings map[string]struct{}
UniqueStrings is a helper for tracking unique values in string form.
func (UniqueStrings) IsDupe ¶
func (u UniqueStrings) IsDupe(s *string) bool
IsDupe returns true if the set already contains the string, otherwise false. Non-nil/empty strings are added to the set.
type Validated ¶
type Validated interface { // ValidateConfig returns nil if the config is valid, otherwise an error describing why it is invalid. // // For implementations: // - Use package multierr to accumulate all errors, rather than returning the first encountered. // - If an anonymous field also implements ValidateConfig(), it must be called explicitly! ValidateConfig() error }
Validated configurations impose constraints that must be checked.
type WebServer ¶
type WebServer struct { AllowOrigins *string BridgeResponseURL *models.URL BridgeCacheTTL *models.Duration HTTPWriteTimeout *models.Duration HTTPPort *uint16 SecureCookies *bool SessionTimeout *models.Duration SessionReaperExpiration *models.Duration MFA WebServerMFA `toml:",omitempty"` RateLimit WebServerRateLimit `toml:",omitempty"` TLS WebServerTLS `toml:",omitempty"` }
type WebServerMFA ¶
type WebServerRateLimit ¶
Directories ¶
Path | Synopsis |
---|---|
cmd/generate
Docs prints core node documentation and/or a list of errors.
|
Docs prints core node documentation and/or a list of errors. |
Click to show internal directories.
Click to hide internal directories.