config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseLogsConfig

type BaseLogsConfig struct {
	Level      string `yaml:"level"`
	MaxSizeMB  int    `yaml:"max_size_mb"`
	MaxBackups int    `yaml:"max_backups"`
	MaxAgeDays int    `yaml:"max_age_days"`
}

type Config

type Config struct {
	Logs struct {
		BaseLogsConfig `yaml:",inline"`
		Filename       string `yaml:"filename"`
	} `yaml:"logs"`

	WriteAheadLogging WriteAheadLogging `yaml:"write_ahead_logging"`

	Printer struct {
		Name            string `yaml:"name"`
		MonitorInterval int    `yaml:"monitor_interval_ms"`
	} `yaml:"printer"`

	Engine struct {
		Handlers             []HandlerConfig `yaml:"handlers"`
		IgnoreRecoveryErrors bool            `yaml:"ignore_recovery_errors"`
		MaxWorkers           int             `yaml:"max_workers"`
	} `yaml:"engine"`
	Workdir string `yaml:"workdir"`
}

func ParseConfig

func ParseConfig(location string) (Config, error)

type HandlerConfig

type HandlerConfig struct {
	Name   string                 `yaml:"name"`
	Retry  HandlerRetryMechanism  `yaml:"retry,omitempty"`
	Config map[string]interface{} `yaml:"config,omitempty"`
}

type HandlerRetryMechanism

type HandlerRetryMechanism struct {
	MaxRetries      int `yaml:"max_retries"`
	BackOffInterval int `yaml:"backoff_interval"`
}

type WriteAheadLogging

type WriteAheadLogging struct {
	BaseLogsConfig `yaml:",inline"`
	Enabled        bool `yaml:"enabled"`
}

Jump to

Keyboard shortcuts

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