config

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultAggregatorRPCServer     = "0.0.0.0:26653"
	DefaultOperatorResponseTimeout = 5 * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AggregatorConfig

type AggregatorConfig struct {
	AggregatorRPCServer     string `json:"aggregator_rpc_server"`
	OperatorResponseTimeout string `json:"operator_response_timeout"`
}

AggregatorConfig stores configuration settings for the aggregator service including network addresses and timeout values

func LoadConfig

func LoadConfig(filePath string, logger log.Logger) (*AggregatorConfig, error)

LoadConfig loads and parses aggregator configuration from a JSON file. It reads the file at the given path, deserializes the JSON content, and returns the resulting configuration object.

func (*AggregatorConfig) Finalize

func (c *AggregatorConfig) Finalize(logger log.Logger)

Finalize ensures that the AggregatorConfig has valid values.

func (*AggregatorConfig) GetOperatorResponseTimeout

func (c *AggregatorConfig) GetOperatorResponseTimeout(logger log.Logger) (time.Duration, error)

GetOperatorResponseTimeout converts the string timeout value to a time.Duration. This allows the timeout value to be used directly in timing operations, parsing the string format into a proper duration object.

type ChainConfig

type ChainConfig struct {
	ChainID                     ChainID        `json:"-"`
	RPCURL                      string         `json:"rpc_url"`
	OperatorInfoProviderAddress common.Address `json:"operator_info_provider_address"`
	OperatorKeyManagerAddress   common.Address `json:"operator_key_manager_address"`
	CentralSchedulerAddress     common.Address `json:"central_scheduler_address"`
}

ChainConfig stores chain-specific configuration parameters including contract addresses and RPC endpoints

type ChainID

type ChainID = int64

ChainID represents a unique identifier for a blockchain network

Jump to

Keyboard shortcuts

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