printer

package
v0.0.0-...-e3e1202 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Printer

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

Printer is used for printing formatted output from the mimirtool

func New

func New(color bool) *Printer

New returns a Printer struct

func (*Printer) PrintAlertmanagerConfig

func (p *Printer) PrintAlertmanagerConfig(config string, templates map[string]string) error

PrintAlertmanagerConfig prints the current alertmanager config

func (*Printer) PrintComparisonResult

func (p *Printer) PrintComparisonResult(results []rules.NamespaceChange, verbose bool) error

PrintComparisonResult prints the differences between the staged rules namespace and active rules namespace

func (*Printer) PrintRuleGroup

func (p *Printer) PrintRuleGroup(rule rwrulefmt.RuleGroup) error

PrintRuleGroup prints the current alertmanager config

func (*Printer) PrintRuleGroups

func (p *Printer) PrintRuleGroups(rules map[string][]rwrulefmt.RuleGroup) error

PrintRuleGroups prints the current alertmanager config

func (*Printer) PrintRuleSet

func (p *Printer) PrintRuleSet(rules map[string][]rwrulefmt.RuleGroup, format string, writer io.Writer) error

func (*Printer) Printf

func (p *Printer) Printf(format string, a ...interface{})

Printf is a convenience wrapper for fmt.Printf with support for color codes.

func (*Printer) Println

func (p *Printer) Println(a string)

Println is a convenience wrapper for fmt.Println with support for color codes.

Jump to

Keyboard shortcuts

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