list

package
v0.26.1 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActionGroupByName added in v0.26.0

func ActionGroupByName(name string, ags []event.ActionGroup) (event.ActionGroup, bool)

func IsLastActionGroup added in v0.26.0

func IsLastActionGroup(age event.ActionGroupEvent, ags []event.ActionGroup) bool

IsLastActionGroup returns true if the passed ActionGroupEvent is the last of its type in the slice of ActionGroup; false otherwise. For example, this function will determine if an ApplyAction is the last ApplyAction in the initialized task queue. This functionality is current used to determine when to print stats.

Types

type ApplyStats

type ApplyStats struct {
	ServersideApplied int
	Created           int
	Unchanged         int
	Configured        int
	Failed            int
}

func (*ApplyStats) Sum

func (a *ApplyStats) Sum() int

type BaseListPrinter

type BaseListPrinter struct {
	FormatterFactory FormatterFactory
}

func (*BaseListPrinter) Print

func (b *BaseListPrinter) Print(ch <-chan event.Event, previewStrategy common.DryRunStrategy, printStatus bool) error

Print outputs the events from the provided channel in a simple format on StdOut. As we support other printer implementations this should probably be an interface. This function will block until the channel is closed.

type Collector

type Collector interface {
	LatestStatus() map[object.ObjMetadata]event.StatusEvent
}

type DeleteStats

type DeleteStats struct {
	Deleted int
	Skipped int
	Failed  int
}

type Formatter

type Formatter interface {
	FormatApplyEvent(ae event.ApplyEvent) error
	FormatStatusEvent(se event.StatusEvent) error
	FormatPruneEvent(pe event.PruneEvent) error
	FormatDeleteEvent(de event.DeleteEvent) error
	FormatErrorEvent(ee event.ErrorEvent) error
	FormatActionGroupEvent(age event.ActionGroupEvent, ags []event.ActionGroup, as *ApplyStats, ps *PruneStats, ds *DeleteStats, c Collector) error
}

type FormatterFactory

type FormatterFactory func(previewStrategy common.DryRunStrategy) Formatter

type PruneStats

type PruneStats struct {
	Pruned  int
	Skipped int
	Failed  int
}

type StatusCollector

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

func (*StatusCollector) LatestStatus

func (sc *StatusCollector) LatestStatus() map[object.ObjMetadata]event.StatusEvent

Jump to

Keyboard shortcuts

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