v1

package
v3.3.0-stargate Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2022 License: CC0-1.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	RPC       *RPCConfig       `toml:"rpc"`
	Grpc      *GrpcConfig      `toml:"grpc"`
	Cosmos    *CosmosConfig    `toml:"cosmos"`
	Database  *DatabaseConfig  `toml:"database"`
	Logging   *LoggingConfig   `toml:"logging"`
	Parsing   *ParsingConfig   `toml:"parsing"`
	Pruning   *PruningConfig   `toml:"pruning"`
	Telemetry *TelemetryConfig `toml:"telemetry"`
}

func GetConfig

func GetConfig() (Config, error)

GetConfig returns the configuration reading it from the config.toml file present inside the home directory

type CosmosConfig

type CosmosConfig struct {
	Prefix  string   `toml:"prefix"`
	Modules []string `toml:"modules"`
}

type DatabaseConfig

type DatabaseConfig struct {
	Name               string `toml:"name"`
	Host               string `toml:"host"`
	Port               int64  `toml:"port"`
	User               string `toml:"user"`
	Password           string `toml:"password"`
	SSLMode            string `toml:"ssl_mode"`
	Schema             string `toml:"schema"`
	MaxOpenConnections int    `toml:"max_open_connections"`
	MaxIdleConnections int    `toml:"max_idle_connections"`
}

type GrpcConfig

type GrpcConfig struct {
	Address  string `toml:"address"`
	Insecure bool   `toml:"insecure"`
}

type LoggingConfig

type LoggingConfig struct {
	LogLevel  string `toml:"level"`
	LogFormat string `toml:"format"`
}

type ParsingConfig

type ParsingConfig struct {
	Workers         int64  `toml:"workers"`
	ParseNewBlocks  bool   `toml:"listen_new_blocks"`
	ParseOldBlocks  bool   `toml:"parse_old_blocks"`
	GenesisFilePath string `toml:"genesis_file_path"`
	ParseGenesis    bool   `toml:"parse_genesis"`
	StartHeight     int64  `toml:"start_height"`
	FastSync        bool   `toml:"fast_sync"`
}

type PruningConfig

type PruningConfig struct {
	KeepRecent int64 `toml:"keep_recent"`
	KeepEvery  int64 `toml:"keep_every"`
	Interval   int64 `toml:"interval"`
}

type RPCConfig

type RPCConfig struct {
	ClientName     string `toml:"client_name"`
	Address        string `toml:"address"`
	MaxConnections int    `toml:"max_connections"`
}

type TelemetryConfig

type TelemetryConfig struct {
	Enabled bool `toml:"enabled"`
	Port    uint `toml:"port"`
}

Jump to

Keyboard shortcuts

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