config

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2023 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package config defines the configuration file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlertMode

type AlertMode int

AlertMode determines if alerts grouped by Alertmanager are being kept together.

const (
	Single AlertMode = iota
	Multi
)

The different modes for AlertMode.

type CacheConfig

type CacheConfig struct {
	// shared settings
	Type     string
	Duration time.Duration
	// memory settings
	CleanupInterval time.Duration
	// redis settings
	RedisURL string
}

CacheConfig is the configuration of the cache.

type Config

type Config struct {
	BaseURL     string
	HTTPAddress string
	LogLevel    string
	AlertMode   AlertMode
	User        string
	Password    string
	Ntfy        ntfyConfig
	Labels      labels
	Cache       CacheConfig
	Am          alertmanagerConfig
	Resolved    resolvedConfig
}

Config is the configuration of the bridge.

func ReadConfig

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

ReadConfig reads an scfg formatted file and returns the configuration struct.

Jump to

Keyboard shortcuts

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