config

package
v0.0.0-...-5d7b32d Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(path string) error

Types

type APIConfig

type APIConfig struct {
	Host                string
	Port                int
	AuthProvider        string
	AuthKeyType         string
	AuthDefaultExpirary int64
	AuthMasterKey       string
	RateLimitStrategy   string
	RateLimitRequests   int
}

type BlockTimestampsSyncConfig

type BlockTimestampsSyncConfig struct {
	BatchSize        int
	BatchConcurrency int
}

type ChainConfig

type ChainConfig struct {
	ChainID     int
	Name        string
	ShortName   string
	ExplorerURL string
	RPCURL      string
}

type Config

type Config struct {
	Chains []ChainConfig

	Sync SyncConfig

	Storage StorageConfig

	API APIConfig
}

func Get

func Get() Config

type PairsSyncConfig

type PairsSyncConfig struct {
	BatchSize        int
	BatchConcurrency int
	BlockRange       int
}

type PostgresConfig

type PostgresConfig struct {
	User     string
	Password string
	Host     string
	Port     string
	SSLMode  string
	Name     string
}

type StorageConfig

type StorageConfig struct {
	Postgres PostgresConfig
}

type SyncConfig

type SyncConfig struct {
	Tokens          TokensSyncConfig
	Pairs           PairsSyncConfig
	BlockTimestamps BlockTimestampsSyncConfig
}

type TokensSyncConfig

type TokensSyncConfig struct {
	BatchSize        int
	BatchConcurrency int
}

Jump to

Keyboard shortcuts

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