config

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: MIT Imports: 10 Imported by: 2 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfigSet = ConfigSet{
	OCR2CachePollPeriod: 5 * time.Second,
	OCR2CacheTTL:        time.Minute,
	RequestTimeout:      10 * time.Second,
	TxTimeout:           10 * time.Second,
	ConfirmationPoll:    5 * time.Second,
}

Functions

This section is empty.

Types

type Chain

type Chain struct {
	OCR2CachePollPeriod *config.Duration
	OCR2CacheTTL        *config.Duration
	RequestTimeout      *config.Duration
	TxTimeout           *config.Duration
	ConfirmationPoll    *config.Duration
}

func (*Chain) SetDefaults

func (c *Chain) SetDefaults()

type Config

type Config interface {
	txm.Config // txm config

	// ocr2 config
	ocr2.Config

	// client config
	RequestTimeout() time.Duration
}

type ConfigSet

type ConfigSet struct {
	OCR2CachePollPeriod time.Duration
	OCR2CacheTTL        time.Duration

	// client config
	RequestTimeout time.Duration

	// txm config
	TxTimeout        time.Duration
	ConfirmationPoll time.Duration
}

type Node

type Node struct {
	Name *string
	URL  *config.URL
	// optional, only if rpc url needs api key passed in header
	APIKey *string
}

type Nodes

type Nodes []*Node

func (*Nodes) SetFrom

func (ns *Nodes) SetFrom(fs *Nodes)

type TOMLConfig

type TOMLConfig struct {
	ChainID   *string
	FeederURL *config.URL
	// Do not access directly. Use [IsEnabled]
	Enabled *bool
	Chain
	Nodes Nodes
}

func (*TOMLConfig) ConfirmationPoll

func (c *TOMLConfig) ConfirmationPoll() time.Duration

func (*TOMLConfig) IsEnabled

func (c *TOMLConfig) IsEnabled() bool

func (*TOMLConfig) ListNodes

func (c *TOMLConfig) ListNodes() ([]db.Node, error)

func (*TOMLConfig) OCR2CachePollPeriod

func (c *TOMLConfig) OCR2CachePollPeriod() time.Duration

func (*TOMLConfig) OCR2CacheTTL

func (c *TOMLConfig) OCR2CacheTTL() time.Duration

func (*TOMLConfig) RequestTimeout

func (c *TOMLConfig) RequestTimeout() time.Duration

func (*TOMLConfig) SetFrom

func (c *TOMLConfig) SetFrom(f *TOMLConfig)

func (*TOMLConfig) TOMLString

func (c *TOMLConfig) TOMLString() (string, error)

func (*TOMLConfig) TxTimeout

func (c *TOMLConfig) TxTimeout() time.Duration

func (*TOMLConfig) ValidateConfig

func (c *TOMLConfig) ValidateConfig() (err error)

type TOMLConfigs

type TOMLConfigs []*TOMLConfig

func (*TOMLConfigs) SetFrom

func (cs *TOMLConfigs) SetFrom(fs *TOMLConfigs) (err error)

func (TOMLConfigs) ValidateConfig

func (cs TOMLConfigs) ValidateConfig() (err error)

Jump to

Keyboard shortcuts

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