Documentation
¶
Index ¶
- Constants
- Variables
- func CreateContext(name string) error
- func Get(path, outputFormat string) (string, error)
- func GetContexts() ([]string, error)
- func Hash() (string, error)
- func Import() error
- func Initialise()
- func Mock(values map[string]interface{})
- func NewConfig()
- func Read() error
- func Set(path string, value string) error
- func Unset(path string) error
- func UsageStatsDisabled() bool
- func UseContext(context string) error
- func Write() error
- type Context
- type GrafanaConfig
- type MimirConfig
- type MimirTLSConfig
- type SyntheticMonitoringConfig
Constants ¶
View Source
const ( CurrentContextSetting = "current-context" DisableReportingSetting = "disable-reporting" )
Variables ¶
View Source
var Version = "dev"
Version is the current version of the grr command. To be overwritten at build time
Functions ¶
func CreateContext ¶
func GetContexts ¶
func Initialise ¶
func Initialise()
func UsageStatsDisabled ¶ added in v0.6.0
func UsageStatsDisabled() bool
func UseContext ¶
Types ¶
type Context ¶
type Context struct { Name string `yaml:"name" mapstructure:"name"` Grafana GrafanaConfig `yaml:"grafana" mapstructure:"grafana"` Mimir MimirConfig `yaml:"mimir" mapstructure:"mimir"` SyntheticMonitoring SyntheticMonitoringConfig `yaml:"synthetic-monitoring" mapstructure:"synthetic-monitoring"` Targets []string `yaml:"targets" mapstructure:"targets"` OutputFormat string `yaml:"output-format" mapstructure:"output-format"` OnlySpec bool `yaml:"only-spec" mapstructure:"only-spec"` ResourceKind string `yaml:"resource-kind" mapstructure:"resource-kind"` FolderUID string `yaml:"folder-uid" mapstructure:"folder-uid"` }
func CurrentContext ¶
func (*Context) GetTargets ¶ added in v0.3.1
type GrafanaConfig ¶
type GrafanaConfig struct { URL string `yaml:"url" mapstructure:"url"` User string `yaml:"user" mapstructure:"user"` Token string `yaml:"token" mapstructure:"token"` InsecureSkipVerify bool `yaml:"insecure-skip-verify" mapstructure:"insecure-skip-verify"` TLSHost string `yaml:"tls-host" mapstructure:"tls-host"` }
type MimirConfig ¶
type MimirConfig struct { Address string `yaml:"address" mapstructure:"address"` TenantID string `yaml:"tenant-id" mapstructure:"tenant-id"` APIKey string `yaml:"api-key" mapstructure:"api-key"` TLS MimirTLSConfig `yaml:"tls" mapstructure:"tls"` AuthToken string `yaml:"auth-token" mapstructure:"auth-token"` }
type MimirTLSConfig ¶ added in v0.4.2
type SyntheticMonitoringConfig ¶
type SyntheticMonitoringConfig struct { URL string `yaml:"url" mapstructure:"url"` // SM can be configured with a metrics publisher token (and various stack information) or an access token gotten from the UI Token string `yaml:"token" mapstructure:"token"` StackID int64 `yaml:"stack-id" mapstructure:"stack-id"` LogsID int64 `yaml:"logs-id" mapstructure:"logs-id"` MetricsID int64 `yaml:"metrics-id" mapstructure:"metrics-id"` AccessToken string `yaml:"access-token" mapstructure:"access-token"` }
Click to show internal directories.
Click to hide internal directories.