reporter

package
v0.22.3 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2022 License: Apache-2.0 Imports: 10 Imported by: 28

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Report

type Report struct {
	Warnings []string
	Errors   error
}

type Reporter

type Reporter interface {
	WriteReports(ctx context.Context, errs ResourceReports, subresourceStatuses map[string]*core.Status) error
}

type ReporterResourceClient added in v0.13.9

type ReporterResourceClient interface {
	Kind() string
	Read(namespace, name string, opts clients.ReadOpts) (resources.Resource, error)
	Write(resource resources.Resource, opts clients.WriteOpts) (resources.Resource, error)
}

Minimal set of client operations required for reporters.

type ResourceReports

type ResourceReports map[resources.InputResource]Report

func (ResourceReports) Accept

func (ResourceReports) AddError

func (e ResourceReports) AddError(res resources.InputResource, err error)

func (ResourceReports) AddErrors added in v0.10.25

func (e ResourceReports) AddErrors(res resources.InputResource, errs ...error)

func (ResourceReports) AddWarning

func (e ResourceReports) AddWarning(res resources.InputResource, warning string)

func (ResourceReports) AddWarnings added in v0.10.25

func (e ResourceReports) AddWarnings(res resources.InputResource, warning ...string)

func (ResourceReports) FilterByKind added in v0.18.3

func (e ResourceReports) FilterByKind(kind string) ResourceReports

func (ResourceReports) Find added in v0.10.25

func (ResourceReports) Merge

func (e ResourceReports) Merge(resErrs ResourceReports)

Merge merges the given resourceReports into this resourceReports. Any resources which appear in both resourceReports will have their warnings and errors merged. Errors appearing in both reports, as determined by the error strings, will not be duplicated in the resulting merged report.

func (ResourceReports) Validate

func (e ResourceReports) Validate() error

ignores warnings

func (ResourceReports) ValidateStrict

func (e ResourceReports) ValidateStrict() error

does not ignore warnings

type StatusReporter added in v0.13.13

type StatusReporter interface {
	Reporter
	StatusFromReport(report Report, subresourceStatuses map[string]*core.Status) *core.Status
}

func NewReporter

func NewReporter(reporterRef string, reporterClients ...ReporterResourceClient) StatusReporter

Jump to

Keyboard shortcuts

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