config

package
v0.0.0-...-8896b81 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2024 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 ChainConfig

type ChainConfig struct {
	ChainID          uint
	RpcUrl           string
	StartingHeight   uint
	Confirmations    uint
	DepositInterval  uint
	WithdrawInterval uint
	CollectInterval  uint
	ColdInterval     uint
	BlocksStep       uint
}

type Config

type Config struct {
	Migrations     string
	Chain          ChainConfig
	MasterDB       DBConfig
	SlaveDB        DBConfig
	SlaveDbEnable  bool
	ApiCacheEnable bool
	CacheConfig    CacheConfig
	RpcServer      ServerConfig
	HTTPServer     ServerConfig
	MetricsServer  ServerConfig
}

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