printer

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2023 License: Apache-2.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 cortextool

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 added in v0.7.2

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