config

package
v2.52.2 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2026 License: Apache-2.0 Imports: 0 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

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 exporter.
	ExporterIDPrometheusSD = "promsd"
	// ExporterIDMetrics is the identifier for the Metrics exporter.
	ExporterIDMetrics = "metrics"
)
View Source
const (
	// ConnectorIDGOCDB is the connector identifier for GOCDB.
	ConnectorIDGOCDB = "gocdb"
)

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"`
			APIKey  string `mapstructure:"apikey"`
		} `mapstructure:"gocdb"`
	} `mapstructure:"connectors"`

	UpdateInterval string `mapstructure:"update_interval"`

	Services struct {
		CriticalTypes []string `mapstructure:"critical_types"`
	} `mapstructure:"services"`

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

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

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

		PrometheusSD struct {
			OutputPath        string   `mapstructure:"output_path"`
			EnabledConnectors []string `mapstructure:"enabled_connectors"`
		} `mapstructure:"promsd"`

		Metrics struct {
			EnabledConnectors []string `mapstructure:"enabled_connectors"`
		} `mapstructure:"metrics"`
	} `mapstructure:"exporters"`

	AccountsService struct {
		URL      string `mapstructure:"url"`
		User     string `mapstructure:"user"`
		Password string `mapstructure:"password"`
	} `mapstructure:"accounts"`

	// 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