genpromcrd

package
v0.0.0-...-c8d90df Latest Latest
Warning

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

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

Documentation

Overview

Package genpromcrd implements all the functionality for the genpromcrd command line application.

Index

Constants

This section is empty.

Variables

View Source
var ErrFlagsParse = errors.New("Failed to parse flags.")

ErrFlagsParse is returned from Main if we failed to parse flags.

Functions

This section is empty.

Types

type AlertTarget

type AlertTarget struct {
	// AppGroup is the value of the template.label.appgroup for the pods to be monitored.
	AppGroup string

	// Directory where the YAML file was found for this appgroup. The scraping
	// and alerting file will be writtin back into this directory.
	Directory string
}

AlertTarget represents a single appgroup that might need monitoring.

func (AlertTarget) TargetFilename

func (a AlertTarget) TargetFilename() string

TargetFilename is the absolute filename where the pod scraping and alert rules should be written as YAML.

type AlertTargets

type AlertTargets map[AlertTarget]bool

AlertTargets keeps track of multiple found AlertTarget's, de-duplicating AlertTargets that are the same.

type App

type App struct {
	// contains filtered or unexported fields
}

App is the application.

func NewApp

func NewApp() *App

NewApp returns a new *App.

func (*App) Main

func (a *App) Main(args []string) error

Main is the application main entry point.

Args are the cli arguments, should be passed in as os.Args.

ErrFlagsParse is returned from Main if we failed to parse flags.

Jump to

Keyboard shortcuts

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