config

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2021 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ConnectorIDGOCDB is the connector identifier for GOCDB.
	ConnectorIDGOCDB = "gocdb"
	// ConnectorIDLocalFile is the connector identifier for local files.
	ConnectorIDLocalFile = "localfile"
)
View Source
const (
	// ImporterIDWebAPI is the identifier for the WebAPI importer.
	ImporterIDWebAPI = "webapi"
	// ImporterIDAdminAPI is the identifier for the AdminAPI importer.
	ImporterIDAdminAPI = "adminapi"
)
View Source
const (
	// ExporterIDWebAPI is the identifier for the WebAPI exporter.
	ExporterIDWebAPI = "webapi"
	// ExporterIDCS3API is the identifier for the CS3API exporter.
	ExporterIDCS3API = "cs3api"
	// ExporterIDSiteLocations is the identifier for the Site Locations exporter.
	ExporterIDSiteLocations = "siteloc"
	// ExporterIDPrometheusSD is the identifier for the PrometheusSD SD exporter.
	ExporterIDPrometheusSD = "promsd"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	Prefix string `mapstructure:"prefix"`

	Connectors struct {
		GOCDB struct {
			Address string `mapstructure:"address"`
			Scope   string `mapstructure:"scope"`
		} `mapstructure:"gocdb"`

		LocalFile struct {
			File string `mapstructure:"file"`
		} `mapstructure:"localfile"`
	} `mapstructure:"connectors"`

	UpdateInterval string `mapstructure:"update_interval"`

	Importers struct {
		WebAPI struct {
			Endpoint          string   `mapstructure:"endpoint"`
			IsProtected       bool     `mapstructure:"is_protected"`
			EnabledConnectors []string `mapstructure:"enabled_connectors"`
		} `mapstructure:"webapi"`

		AdminAPI struct {
			Endpoint          string   `mapstructure:"endpoint"`
			IsProtected       bool     `mapstructure:"is_protected"`
			EnabledConnectors []string `mapstructure:"enabled_connectors"`
		} `mapstructure:"adminapi"`
	} `mapstructure:"importers"`

	Exporters struct {
		WebAPI struct {
			Endpoint          string   `mapstructure:"endpoint"`
			IsProtected       bool     `mapstructure:"is_protected"`
			EnabledConnectors []string `mapstructure:"enabled_connectors"`
		} `mapstructure:"webapi"`

		CS3API struct {
			Endpoint          string   `mapstructure:"endpoint"`
			IsProtected       bool     `mapstructure:"is_protected"`
			EnabledConnectors []string `mapstructure:"enabled_connectors"`
		} `mapstructure:"cs3api"`

		SiteLocations struct {
			Endpoint          string   `mapstructure:"endpoint"`
			IsProtected       bool     `mapstructure:"is_protected"`
			EnabledConnectors []string `mapstructure:"enabled_connectors"`
		} `mapstructure:"siteloc"`

		PrometheusSD struct {
			MetricsOutputFile  string   `mapstructure:"metrics_output_file"`
			BlackboxOutputFile string   `mapstructure:"blackbox_output_file"`
			EnabledConnectors  []string `mapstructure:"enabled_connectors"`
		} `mapstructure:"promsd"`
	} `mapstructure:"exporters"`

	// Internal settings
	EnabledConnectors []string `mapstructure:"-"`
	EnabledImporters  []string `mapstructure:"-"`
	EnabledExporters  []string `mapstructure:"-"`
}

Configuration holds the general Mentix configuration.

func (*Configuration) Init

func (c *Configuration) Init()

Init sets sane defaults.

Jump to

Keyboard shortcuts

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