config

package
v0.0.0-...-ac8a210 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrConfigNotFound = errors.New("the config file was not found")

Functions

This section is empty.

Types

type Config

type Config struct {
	StorageFolder  string         `mapstructure:"storageFolder"`
	DatabaseName   string         `mapstructure:"databaseName"`
	ServerPort     int            `mapstructure:"serverPort"`
	GethConfig     GethConfig     `mapstructure:"geth"`
	FuzzerConfig   FuzzerConfig   `mapstructure:"fuzzer"`
	VandalConfig   VandalConfig   `mapstructure:"vandal"`
	JobConfig      JobConfig      `mapstructure:"job"`
	EventConfig    EventConfig    `mapstructure:"event"`
	ReporterConfig ReporterConfig `mapstructure:"reporter"`
}

func LoadConfig

func LoadConfig(configPath string) (*Config, error)

type EventConfig

type EventConfig struct {
	EnabledListeners []string `mapstructure:"enabledListeners"`
}

type FuzzerConfig

type FuzzerConfig struct {
	CritialInstructions          []string      `mapstructure:"criticalInstructions"`
	BatchSize                    int           `mapstructure:"batchSize"`
	SeedsSize                    int           `mapstructure:"seedsSize"`
	Seeds                        common.Seeds  `mapstructure:"seeds"`
	TransactionTimeout           time.Duration `mapstructure:"transactionTimeout"`
	PendingTransactionsThreshold int           `mapstructure:"pendingTransactionsThreshold"`
}

type GethConfig

type GethConfig struct {
	NodeAddress           string `mapstructure:"nodeAddress"`
	ChainID               int64  `mapstructure:"chainId"`
	MinGasLimit           uint64 `mapstructure:"minGasLimit"`
	DeployerAddress       string `mapstructure:"deployerAddress"`
	DeployerPrivateKeyHex string `mapstructure:"deployerPrivateKeyHex"`
	AgentAddress          string `mapstructure:"agentAddress"`
	AgentPrivateKeyHex    string `mapstructure:"agentPrivateKeyHex"`
}

type JobConfig

type JobConfig struct {
	EnabledJobs []string `mapstructure:"enabledJobs"`
}

type ReporterConfig

type ReporterConfig struct {
	Type            common.ReporterType `mapstructure:"type"`
	WebhookEndpoint string              `mapstructure:"webhookEndpoint"`
	WebhookTimeout  time.Duration       `mapstructure:"webhookTimeout"`
	FileOutputPath  string              `mapstructure:"fileOutputPath"`
}

type VandalConfig

type VandalConfig struct {
	Endpoint string `mapstructure:"endpoint"`
}

Jump to

Keyboard shortcuts

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