config

package
v0.0.0-...-48d27f4 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheConfig

type CacheConfig struct {
	ListSize         int
	DetailSize       int
	ListExpireTime   time.Duration
	DetailExpireTime time.Duration
}

type ChainNodeConfig

type ChainNodeConfig struct {
	ChainId              uint64
	ChainName            string
	RpcUrl               string
	StartingHeight       uint
	Confirmations        uint
	SynchronizerInterval time.Duration
	WorkerInterval       time.Duration
	BlocksStep           uint64
}

type Config

type Config struct {
	Migrations     string
	ChainNode      ChainNodeConfig
	MasterDB       DBConfig
	SlaveDB        DBConfig
	SlaveDbEnable  bool
	ApiCacheEnable bool
	CacheConfig    CacheConfig
	RpcServer      ServerConfig
	MetricsServer  ServerConfig
	ChainBtcRpc    string
}

func LoadConfig

func LoadConfig(cliCtx *cli.Context) (Config, error)

func NewConfig

func NewConfig(ctx *cli.Context) Config

type DBConfig

type DBConfig struct {
	Host     string
	Port     int
	Name     string
	User     string
	Password string
}

type ServerConfig

type ServerConfig struct {
	Host string
	Port int
}

Jump to

Keyboard shortcuts

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