v2

package
v1.8.1-beta2 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CLDev = strings.ToLower(os.Getenv("CL_DEV")) == "true"
)

Functions

func Validate added in v1.8.0

func Validate(cfg interface{}) (err error)

Validate returns any errors from calling Validated.ValidateConfig on cfg and any nested types that implement Validated.

Types

type AutoPprof

type AutoPprof struct {
	Enabled              *bool //TODO Disabled https://app.shortcut.com/chainlinklabs/story/33615/
	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
	ExplorerURL         *models.URL
	InsecureFastScrypt  *bool
	RootDir             *string
	ShutdownGracePeriod *models.Duration

	Feature *Feature

	Database *Database

	TelemetryIngress *TelemetryIngress

	Log *Log

	WebServer *WebServer

	JobPipeline *JobPipeline

	FluxMonitor *FluxMonitor

	OCR2 *OCR2

	OCR *OCR

	P2P *P2P

	Keeper *Keeper

	AutoPprof *AutoPprof

	Sentry *Sentry
}

Core holds the core configuration. See chainlink.Config for more information.

type Database

type Database struct {
	DefaultIdleInTxSessionTimeout *models.Duration
	DefaultLockTimeout            *models.Duration
	DefaultQueryTimeout           *models.Duration
	MigrateOnStartup              *bool
	ORMMaxIdleConns               *int64
	ORMMaxOpenConns               *int64

	Backup *DatabaseBackup

	Listener *DatabaseListener

	Lock *DatabaseLock
}

type DatabaseBackup

type DatabaseBackup struct {
	Dir              *string
	Frequency        *models.Duration
	Mode             *config.DatabaseBackupMode
	OnVersionUpgrade *bool
}

type DatabaseListener

type DatabaseListener struct {
	MaxReconnectDuration *models.Duration
	MinReconnectInterval *models.Duration
	FallbackPollInterval *models.Duration
}

type DatabaseLock

type DatabaseLock struct {
	LeaseDuration        *models.Duration
	LeaseRefreshInterval *models.Duration
}

type ErrEmpty added in v1.8.0

type ErrEmpty struct {
	Name string
	Msg  string
}

func (ErrEmpty) Error added in v1.8.0

func (e ErrEmpty) Error() string

type ErrInvalid added in v1.8.0

type ErrInvalid struct {
	Name  string
	Value any
	Msg   string
}

func (ErrInvalid) Error added in v1.8.0

func (e ErrInvalid) Error() string

type ErrMissing added in v1.8.0

type ErrMissing struct {
	Name string
	Msg  string
}

func (ErrMissing) Error added in v1.8.0

func (e ErrMissing) Error() string

type Feature

type Feature struct {
	FeedsManager *bool
	LogPoller    *bool
	UICSAKeys    *bool
}

type FluxMonitor

type FluxMonitor struct {
	DefaultTransactionQueueDepth *uint32
	SimulateTransactions         *bool
}

type JobPipeline

type JobPipeline struct {
	DefaultHTTPRequestTimeout *models.Duration
	ExternalInitiatorsEnabled *bool
	HTTPRequestMaxSize        *utils.FileSize
	MaxRunDuration            *models.Duration
	ReaperInterval            *models.Duration
	ReaperThreshold           *models.Duration
	ResultWriteQueueDepth     *uint32
}

type Keeper

type Keeper struct {
	DefaultTransactionQueueDepth *uint32
	GasPriceBufferPercent        *uint32
	GasTipCapBufferPercent       *uint32
	BaseFeeBufferPercent         *uint32
	MaximumGracePeriod           *int64
	RegistryCheckGasOverhead     *uint32
	RegistryPerformGasOverhead   *uint32
	RegistrySyncInterval         *models.Duration
	RegistrySyncUpkeepQueueSize  *uint32
	TurnLookBack                 *int64
	TurnFlagEnabled              *bool
	UpkeepCheckGasPriceEnabled   *bool
}

type Log

type Log struct {
	DatabaseQueries *bool
	FileDir         *string
	FileMaxSize     *utils.FileSize
	FileMaxAgeDays  *int64
	FileMaxBackups  *int64
	JSONConsole     *bool
	UnixTS          *bool
}

type OCR

type OCR struct {
	Enabled                      *bool //TODO disabled https://app.shortcut.com/chainlinklabs/story/33615/
	ObservationTimeout           *models.Duration
	BlockchainTimeout            *models.Duration
	ContractPollInterval         *models.Duration
	ContractSubscribeInterval    *models.Duration
	DefaultTransactionQueueDepth *uint32
	// Optional
	KeyBundleID          *models.Sha256Hash
	SimulateTransactions *bool
	TransmitterAddress   *ethkey.EIP55Address
}

type OCR2

type OCR2 struct {
	Enabled                            *bool //TODO disabled https://app.shortcut.com/chainlinklabs/story/33615/
	ContractConfirmations              *uint32
	BlockchainTimeout                  *models.Duration
	ContractPollInterval               *models.Duration
	ContractSubscribeInterval          *models.Duration
	ContractTransmitterTransmitTimeout *models.Duration
	DatabaseTimeout                    *models.Duration
	KeyBundleID                        *models.Sha256Hash
}

type P2P

type P2P struct {
	// V1 and V2
	IncomingMessageBufferSize *int64
	OutgoingMessageBufferSize *int64
	TraceLogging              *bool

	V1 *P2PV1

	V2 *P2PV2
}

func (*P2P) NetworkStack

func (p *P2P) NetworkStack() ocrnetworking.NetworkingStack

type P2PV1

type P2PV1 struct {
	AnnounceIP                       *net.IP
	AnnouncePort                     *uint16
	BootstrapCheckInterval           *models.Duration
	DefaultBootstrapPeers            *[]string
	DHTAnnouncementCounterUserPrefix *uint32
	DHTLookupInterval                *int64
	ListenIP                         *net.IP
	ListenPort                       *uint16
	NewStreamTimeout                 *models.Duration
	PeerID                           *p2pkey.PeerID
	PeerstoreWriteInterval           *models.Duration
}

type P2PV2

type P2PV2 struct {
	AnnounceAddresses    *[]string
	DefaultBootstrappers *[]ocrcommontypes.BootstrapperLocator
	DeltaDial            *models.Duration
	DeltaReconcile       *models.Duration
	ListenAddresses      *[]string
}

type Secrets

type Secrets struct {
	DatabaseURL       *models.URL
	DatabaseBackupURL *models.URL

	ExplorerAccessKey *string
	ExplorerSecret    *string

	KeystorePassword *string
	VRFPassword      *string
}

func (*Secrets) GoString added in v1.8.0

func (s *Secrets) GoString() string

func (*Secrets) MarshalJSON added in v1.8.0

func (s *Secrets) MarshalJSON() ([]byte, error)

func (*Secrets) MarshalText added in v1.8.0

func (s *Secrets) MarshalText() ([]byte, error)

func (*Secrets) String added in v1.8.0

func (s *Secrets) String() string

func (*Secrets) ValidateConfig added in v1.8.0

func (s *Secrets) ValidateConfig() (err error)

type Sentry

type Sentry struct {
	Debug       *bool
	DSN         *string
	Environment *string
	Release     *string
}

type TelemetryIngress

type TelemetryIngress struct {
	UniConn      *bool
	Logging      *bool
	ServerPubKey *string
	URL          *models.URL
	BufferSize   *uint16
	MaxBatchSize *uint16
	SendInterval *models.Duration
	SendTimeout  *models.Duration
	UseBatchSend *bool
}

type Validated added in v1.8.0

type Validated interface {
	// ValidateConfig returns nil if the config is valid, otherwise an error describing why it is invalid.
	//
	// For implementations:
	//  - A nil receiver should return nil, freeing the caller to decide whether each case is required.
	//  - Use package multierr to accumulate all errors, rather than returning the first encountered.
	ValidateConfig() error
}

Validated configurations impose constraints that must be checked.

type WebServer

type WebServer struct {
	AllowOrigins            *string
	BridgeResponseURL       *models.URL
	HTTPWriteTimeout        *models.Duration
	HTTPPort                *uint16
	SecureCookies           *bool
	SessionTimeout          *models.Duration
	SessionReaperExpiration *models.Duration

	MFA *WebServerMFA

	RateLimit *WebServerRateLimit

	TLS *WebServerTLS
}

type WebServerMFA

type WebServerMFA struct {
	RPID     *string
	RPOrigin *string
}

type WebServerRateLimit

type WebServerRateLimit struct {
	Authenticated         *int64
	AuthenticatedPeriod   *models.Duration
	Unauthenticated       *int64
	UnauthenticatedPeriod *models.Duration
}

type WebServerTLS

type WebServerTLS struct {
	CertPath      *string
	ForceRedirect *bool
	Host          *string
	HTTPSPort     *uint16
	KeyPath       *string
}

Jump to

Keyboard shortcuts

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