config

package
v2.8.0-beta1 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEnvUnset = errors.New("env var unset")
)

nolint

Functions

This section is empty.

Types

type AppConfig added in v2.2.0

type AppConfig interface {
	AppID() uuid.UUID
	RootDir() string
	ShutdownGracePeriod() time.Duration
	InsecureFastScrypt() bool
	EVMEnabled() bool
	EVMRPCEnabled() bool
	CosmosEnabled() bool
	SolanaEnabled() bool
	StarkNetEnabled() bool

	Validate() error
	ValidateDB() error
	LogConfiguration(log, warn LogfFn)
	SetLogLevel(lvl zapcore.Level) error
	SetLogSQL(logSQL bool)
	SetPasswords(keystore, vrf *string)

	AuditLogger() AuditLogger
	AutoPprof() AutoPprof
	Database() Database
	Feature() Feature
	FluxMonitor() FluxMonitor
	Insecure() Insecure
	JobPipeline() JobPipeline
	Keeper() Keeper
	Log() Log
	Mercury() Mercury
	OCR() OCR
	OCR2() OCR2
	P2P() P2P
	Password() Password
	Prometheus() Prometheus
	Pyroscope() Pyroscope
	Sentry() Sentry
	TelemetryIngress() TelemetryIngress
	Threshold() Threshold
	WebServer() WebServer
	Tracing() Tracing
}

type AuditLogger added in v2.3.0

type AuditLogger interface {
	Enabled() bool
	ForwardToUrl() (models.URL, error)
	Environment() string
	JsonWrapperKey() string
	Headers() (models.ServiceHeaders, error)
}

type AutoPprof added in v2.2.0

type AutoPprof interface {
	BlockProfileRate() int
	CPUProfileRate() int
	Enabled() bool
	GatherDuration() models.Duration
	GatherTraceDuration() models.Duration
	GoroutineThreshold() int
	MaxProfileSize() utils.FileSize
	MemProfileRate() int
	MemThreshold() utils.FileSize
	MutexProfileFraction() int
	PollInterval() models.Duration
	ProfileRoot() string
}

type Backup added in v2.3.0

type Backup interface {
	Dir() string
	Frequency() time.Duration
	Mode() DatabaseBackupMode
	OnVersionUpgrade() bool
	URL() *url.URL
}

type Database added in v2.2.0

type Database interface {
	Backup() Backup
	Listener() Listener
	Lock() Lock

	DefaultIdleInTxSessionTimeout() time.Duration
	DefaultLockTimeout() time.Duration
	DefaultQueryTimeout() time.Duration
	Dialect() dialects.DialectName
	LogSQL() bool
	MaxIdleConns() int
	MaxOpenConns() int
	MigrateDatabase() bool
	URL() url.URL
}

type DatabaseBackupMode

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

type Feature added in v2.3.0

type Feature interface {
	FeedsManager() bool
	UICSAKeys() bool
	LogPoller() bool
}

type File added in v2.3.0

type File interface {
	Dir() string
	MaxSize() utils.FileSize
	MaxAgeDays() int64
	MaxBackups() int64
}

type FluxMonitor added in v2.2.0

type FluxMonitor interface {
	DefaultTransactionQueueDepth() uint32
	SimulateTransactions() bool
}

type Insecure added in v2.2.0

type Insecure interface {
	DevWebServer() bool
	OCRDevelopmentMode() bool
	DisableRateLimiting() bool
	InfiniteDepthQueries() bool
}

type JobPipeline added in v2.2.0

type JobPipeline interface {
	DefaultHTTPLimit() int64
	DefaultHTTPTimeout() models.Duration
	MaxRunDuration() time.Duration
	MaxSuccessfulRuns() uint64
	ReaperInterval() time.Duration
	ReaperThreshold() time.Duration
	ResultWriteQueueDepth() uint64
	ExternalInitiatorsEnabled() bool
}

type Keeper added in v2.2.0

type Keeper interface {
	DefaultTransactionQueueDepth() uint32
	GasPriceBufferPercent() uint16
	GasTipCapBufferPercent() uint16
	BaseFeeBufferPercent() uint16
	MaxGracePeriod() int64
	TurnLookBack() int64
	Registry() Registry
}

type LDAP added in v2.8.0

type LDAP interface {
	ServerAddress() string
	ReadOnlyUserLogin() string
	ReadOnlyUserPass() string
	ServerTLS() bool
	SessionTimeout() models.Duration
	QueryTimeout() time.Duration
	BaseUserAttr() string
	BaseDN() string
	UsersDN() string
	GroupsDN() string
	ActiveAttribute() string
	ActiveAttributeAllowedValue() string
	AdminUserGroupCN() string
	EditUserGroupCN() string
	RunUserGroupCN() string
	ReadUserGroupCN() string
	UserApiTokenEnabled() bool
	UserAPITokenDuration() models.Duration
	UpstreamSyncInterval() models.Duration
	UpstreamSyncRateLimit() models.Duration
}

type Listener added in v2.3.0

type Listener interface {
	MaxReconnectDuration() time.Duration
	MinReconnectInterval() time.Duration
	FallbackPollInterval() time.Duration
}

type Lock added in v2.3.0

type Lock interface {
	LockingMode() string
	LeaseDuration() time.Duration
	LeaseRefreshInterval() time.Duration
}

type Log added in v2.3.0

type Log interface {
	DefaultLevel() zapcore.Level
	JSONConsole() bool
	Level() zapcore.Level
	UnixTimestamps() bool

	File() File
}

type LogfFn added in v2.1.0

type LogfFn func(string, ...any)

type MFA added in v2.3.0

type MFA interface {
	RPID() string
	RPOrigin() string
}

type Mercury added in v2.3.0

type Mercury interface {
	Credentials(credName string) *ocr2models.MercuryCredentials
	Cache() MercuryCache
}

type MercuryCache added in v2.8.0

type MercuryCache interface {
	LatestReportTTL() time.Duration
	MaxStaleAge() time.Duration
	LatestReportDeadline() time.Duration
}

type OCR added in v2.3.0

type OCR interface {
	Enabled() bool
	// OCR1 config, can override in jobs, only ethereum.
	BlockchainTimeout() time.Duration
	ContractPollInterval() time.Duration
	ContractSubscribeInterval() time.Duration
	KeyBundleID() (string, error)
	ObservationTimeout() time.Duration
	SimulateTransactions() bool
	TransmitterAddress() (ethkey.EIP55Address, error) // OCR2 can support non-evm changes
	// OCR1 config, cannot override in jobs
	TraceLogging() bool
	DefaultTransactionQueueDepth() uint32
	CaptureEATelemetry() bool
}

OCR is a subset of global config relevant to OCR v1.

type OCR2 added in v2.3.0

type OCR2 interface {
	Enabled() bool
	// OCR2 config, can override in jobs, all chains
	ContractConfirmations() uint16
	ContractTransmitterTransmitTimeout() time.Duration
	BlockchainTimeout() time.Duration
	DatabaseTimeout() time.Duration
	ContractPollInterval() time.Duration
	ContractSubscribeInterval() time.Duration
	KeyBundleID() (string, error)
	// OCR2 config, cannot override in jobs
	TraceLogging() bool
	CaptureEATelemetry() bool
	DefaultTransactionQueueDepth() uint32
	SimulateTransactions() bool
	CaptureAutomationCustomTelemetry() bool
}

OCR2 is a subset of global config relevant to OCR v2.

type P2P added in v2.3.0

type P2P interface {
	V2() V2
	V1() V1
	NetworkStack() (n ocrnetworking.NetworkingStack)
	PeerID() p2pkey.PeerID
	IncomingMessageBufferSize() int
	OutgoingMessageBufferSize() int
	TraceLogging() bool
	Enabled() bool
}

type Password added in v2.3.0

type Password interface {
	Keystore() string
	VRF() string
}

type Prometheus added in v2.2.0

type Prometheus interface {
	AuthToken() string
}

type Pyroscope added in v2.2.0

type Pyroscope interface {
	AuthToken() string
	ServerAddress() string
	Environment() string
}

type RateLimit added in v2.3.0

type RateLimit interface {
	Authenticated() int64
	AuthenticatedPeriod() time.Duration
	Unauthenticated() int64
	UnauthenticatedPeriod() time.Duration
}

type Registry added in v2.3.0

type Registry interface {
	CheckGasOverhead() uint32
	PerformGasOverhead() uint32
	MaxPerformDataSize() uint32
	SyncInterval() time.Duration
	SyncUpkeepQueueSize() uint32
}

type Sentry added in v2.2.0

type Sentry interface {
	DSN() string
	Debug() bool
	Environment() string
	Release() string
}

type TLS added in v2.3.0

type TLS interface {
	Dir() string
	Host() string
	ForceRedirect() bool
	CertFile() string
	KeyFile() string
	HTTPSPort() uint16
	ListenIP() net.IP
}

type TelemetryIngress added in v2.2.0

type TelemetryIngress interface {
	Logging() bool
	UniConn() bool
	BufferSize() uint
	MaxBatchSize() uint
	SendInterval() time.Duration
	SendTimeout() time.Duration
	UseBatchSend() bool
	Endpoints() []TelemetryIngressEndpoint

	ServerPubKey() string // Deprecated: Use TelemetryIngressEndpoint.ServerPubKey instead, this field will be removed in future versions
	URL() *url.URL        // Deprecated: Use TelemetryIngressEndpoint.URL instead, this field will be removed in future versions
}

type TelemetryIngressEndpoint added in v2.7.0

type TelemetryIngressEndpoint interface {
	Network() string
	ChainID() string
	ServerPubKey() string
	URL() *url.URL
}

type Threshold added in v2.3.0

type Threshold interface {
	ThresholdKeyShare() string
}

type Tracing added in v2.7.0

type Tracing interface {
	Enabled() bool
	CollectorTarget() string
	NodeID() string
	SamplingRatio() float64
	TLSCertPath() string
	Mode() string
	Attributes() map[string]string
}

type V1 added in v2.3.0

type V1 interface {
	Enabled() bool
	AnnounceIP() net.IP
	AnnouncePort() uint16
	DefaultBootstrapPeers() ([]string, error)
	DHTAnnouncementCounterUserPrefix() uint32
	ListenIP() net.IP
	ListenPort() uint16
	NewStreamTimeout() time.Duration
	BootstrapCheckInterval() time.Duration
	DHTLookupInterval() int
	PeerstoreWriteInterval() time.Duration
}

type V2 added in v2.3.0

type V2 interface {
	Enabled() bool
	AnnounceAddresses() []string
	DefaultBootstrappers() (locators []ocrcommontypes.BootstrapperLocator)
	DeltaDial() models.Duration
	DeltaReconcile() models.Duration
	ListenAddresses() []string
}

type WebServer added in v2.3.0

type WebServer interface {
	AuthenticationMethod() string
	AllowOrigins() string
	BridgeCacheTTL() time.Duration
	BridgeResponseURL() *url.URL
	HTTPMaxSize() int64
	StartTimeout() time.Duration
	HTTPWriteTimeout() time.Duration
	HTTPPort() uint16
	SessionReaperExpiration() models.Duration
	SecureCookies() bool
	SessionOptions() sessions.Options
	SessionTimeout() models.Duration
	ListenIP() net.IP

	TLS() TLS
	RateLimit() RateLimit
	MFA() MFA
	LDAP() LDAP
}

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.

Jump to

Keyboard shortcuts

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