config

package
v0.0.0-...-d85ed84 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2022 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 Config

type Config struct {
	Node  NodeConfig  `toml:"node"`
	Mongo MongoConfig `toml:"mongo"`
}

func LoadConfig

func LoadConfig(filePath string) *Config

type MongoConfig

type MongoConfig struct {
	Host     string
	Port     int
	Database string
}

func (*MongoConfig) GetAddress

func (cfg *MongoConfig) GetAddress() string

func (*MongoConfig) GetURI

func (cfg *MongoConfig) GetURI() string

type NodeConfig

type NodeConfig struct {
	Host      string
	Port      int
	SeedNodes []string `toml:"seed-nodes"`
}

func (*NodeConfig) GetAddress

func (cfg *NodeConfig) GetAddress() string

Jump to

Keyboard shortcuts

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