config

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2022 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ConfigPath is the variable which stores the config path command line parameter
	ConfigPath string
)

Functions

This section is empty.

Types

type Config

type Config struct {
	// NumReplicas number of replicas that are in the distributed system
	NumReplicas int `json:"num_replicas"`
	// Byzantine indicating if the algorithm being tested is byzantine fault tolerant
	Byzantine bool `json:"byzantine"`
	// APIServerAddr address of the APIServer
	APIServerAddr string `json:"server_addr"`
	// LogConfig configuration for logging
	LogConfig LogConfig `json:"log"`
}

Config stores the config for the tool

func ParseConfig

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

PatseConfig parses config from the specificied file

type LogConfig

type LogConfig struct {
	// Path of the log file
	Path string `json:"path"`
	// Format to log. Only `json` is currently supported
	Format string `json:"format"`
	// Level log level, one of panic|fatal|error|warn|warning|info|debug|trace
	Level string `json:"level"`
}

LogConfig stores the config for logging purpose

Jump to

Keyboard shortcuts

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