reporter

package
v0.13.10 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check(handler StatusHandler, resources ...resources.InputResource)

Types

type Reporter

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

func NewReporter

func NewReporter(reporterRef string, resourceClients ...clients.ResourceClient) Reporter

type ResourceErrors

type ResourceErrors map[resources.InputResource]error

func (ResourceErrors) Accept

func (ResourceErrors) AddError

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

func (ResourceErrors) Merge

func (e ResourceErrors) Merge(resErrs ResourceErrors)

func (ResourceErrors) Validate

func (e ResourceErrors) Validate() error

type StatusHandler

type StatusHandler interface {
	OnAccepted(resource resources.Resource)
	OnRejected(resource resources.Resource)
	OnPending(resource resources.Resource)
}

check reports on objects

type StatusHandlerFuncs

type StatusHandlerFuncs struct {
	OnAcceptedF func(resource resources.Resource)
	OnRejectedF func(resource resources.Resource)
	OnPendingF  func(resource resources.Resource)
}

func (*StatusHandlerFuncs) OnAccepted

func (f *StatusHandlerFuncs) OnAccepted(resource resources.Resource)

func (*StatusHandlerFuncs) OnPending

func (f *StatusHandlerFuncs) OnPending(resource resources.Resource)

func (*StatusHandlerFuncs) OnRejected

func (f *StatusHandlerFuncs) OnRejected(resource resources.Resource)

Jump to

Keyboard shortcuts

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