config

package
v0.0.0-...-5aa5535 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2024 License: Apache-2.0 Imports: 7 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 {
	Path            string        `yaml:"path"`
	ServerID        string        `yaml:"id"`
	Host            string        `yaml:"host"`
	Port            int           `yaml:"port"`
	DataDir         string        `yaml:"dir"`
	Bootstrap       bool          `yaml:"bootstrap"`
	Peers           []string      `yaml:"peers"`
	SerfPort        int           `yaml:"serf_port"`
	StatsTimer      time.Duration `yaml:"stats_loop_timer"`
	BackgroundTimer time.Duration `yaml:"background_loop_timer"`
	DBName          string
}

func New

func New(cctx *cli.Context) *Config

func Parse

func Parse(path string) (*Config, error)

func (*Config) DataPath

func (c *Config) DataPath() string

func (*Config) ListenAddress

func (c *Config) ListenAddress() string

func (*Config) RaftAddress

func (c *Config) RaftAddress() string

func (*Config) ServiceAddress

func (c *Config) ServiceAddress() string

Jump to

Keyboard shortcuts

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