v1

package
v1.1.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfigFilePath

func GetConfigFilePath() string

GetConfigFilePath returns the path to the configuration file given the executable name

func ReadConfig

func ReadConfig() ([]byte, error)

ReadConfig reads the config.toml file contents

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 ParseConfig

func ParseConfig(configData []byte) (Config, error)

ParseConfig attempts to read and parse a Juno Config from the given string bytes. An error reading or parsing the Config results in a panic.

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