config

package
v0.0.0-...-f52cd09 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2024 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	UsersConf       []UserConf `json:"users_conf"`
	OpenNMSAddress  string     `json:"opennms_address"`
	CleanupDuration int        `json:"cleanup_duration"`
}

Config read from resources/conf.json file

func ReadConfig

func ReadConfig(confFile string) (Config, error)

ReadConfig reads the configurations from conf.json file

type FMConfig

type FMConfig struct {
	Source         string `json:"source"`
	NodeID         string `json:"node_id"`
	Host           string `json:"host"`
	Service        string `json:"service"`
	DestinationDir string `json:"destination_dir"`
}

FMConfig keeps configuration needed to push alarm data to OpenNMS

type PMConfig

type PMConfig struct {
	ForeignID      string `json:"foreign_id"`
	DestinationDir string `json:"destination_dir"`
}

PMConfig keeps foreign ID and response directory configuration for OpenNMS

type UserConf

type UserConf struct {
	SourceDir string   `json:"source_dir"`
	PMConfig  PMConfig `json:"pm_config"`
	FMConfig  FMConfig `json:"fm_config"`
}

UserConf keeps PM/FM config for every users.

Jump to

Keyboard shortcuts

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