config

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: May 12, 2022 License: MIT Imports: 4 Imported by: 4

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"`
	// Strategy config
	StrategyConfig StrategyConfig `json:"strategy"`
	// The raw json of the config
	Raw map[string]interface{} `json:"-"`
}

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

type StrategyConfig added in v0.1.3

type StrategyConfig struct {
	// Iterations the number of iterations to be run
	Iterations int `json:"iterations"`
	// IterationTimeout timeout for each iteration
	IterationTimeout time.Duration `json:"iteration_timeout"`
}

StrategyConfig store the config used for running strategies

Jump to

Keyboard shortcuts

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