config

package
v1.0.103 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2020 License: Apache-2.0 Imports: 5 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppInsights added in v1.0.92

type AppInsights struct {
	Name          string        `yaml:"name"`
	Location      string        `yaml:"location"`
	ResourceGroup string        `yaml:"resourceGroup"`
	Frequency     int32         `yaml:"frequency"`
	GeoLocation   []interface{} `yaml:"geoLocation"`
	EmailAction   EmailAction   `yaml:"emailAction"`
	WebhookAction WebhookAction `yaml:"webhookAction"`
}

type Config

type Config struct {
	Providers             []Provider    `yaml:"providers"`
	EnableMonitorDeletion bool          `yaml:"enableMonitorDeletion"`
	MonitorNameTemplate   string        `yaml:"monitorNameTemplate"`
	ResyncPeriod          int           `yaml:"resyncPeriod,omitempty"`
	CreationDelay         time.Duration `yaml:"creationDelay,omitempty"`
}

func GetControllerConfig

func GetControllerConfig() Config

func ReadConfig

func ReadConfig(filePath string) Config

func (*Config) UnmarshalYAML added in v1.0.80

func (c *Config) UnmarshalYAML(data []byte) error

UnmarshalYAML interface to deserialize specific types

type EmailAction added in v1.0.92

type EmailAction struct {
	SendToServiceOwners bool     `yaml:"send_to_service_owners"`
	CustomEmails        []string `yaml:"custom_emails"`
}

type Gcloud added in v1.0.102

type Gcloud struct {
	ProjectID string `yaml:"projectId"`
}

type Provider

type Provider struct {
	Name              string      `yaml:"name"`
	ApiKey            string      `yaml:"apiKey"`
	ApiToken          string      `yaml:"apiToken"`
	ApiURL            string      `yaml:"apiURL"`
	AlertContacts     string      `yaml:"alertContacts"`
	AlertIntegrations string      `yaml:"alertIntegrations"`
	Username          string      `yaml:"username"`
	Password          string      `yaml:"password"`
	AccountEmail      string      `yaml:"accountEmail"`
	AppInsightsConfig AppInsights `yaml:"appInsightsConfig"`
	GcloudConfig      Gcloud      `yaml:"gcloudConfig"`
}

type WebhookAction added in v1.0.92

type WebhookAction struct {
	ServiceURI string `yaml:"service_uri"`
}

Jump to

Keyboard shortcuts

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