differ

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Differ

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

Differ is responsible for subscribing to an informer an filtering out events

func NewDiffer

func NewDiffer(m string, f wrapper.Wrap, i cache.SharedInformer, o Output) *Differ

NewDiffer constructs a Differ

func (*Differ) Run

func (d *Differ) Run(stopCh <-chan struct{}) error

Run sets up eventhandlers, sync informer caches and blocks until stop is closed

type Output

type Output interface {
	WriteAdded(name string, namespace string, objectType string)
	WriteDeleted(name string, namespace string, objectType string)
	WriteUpdated(name string, namespace string, objectType string, diffs []string)
}

Output abstracts a straightforward way to write

func NewOutput

func NewOutput(fmt OutputFormat, logAdded bool, logDeleted bool) Output

NewOutput constructs a new outputter

type OutputFormat

type OutputFormat int

OutputFormat encodes

const (
	// Text outputs the diffs in a simple text based format
	Text OutputFormat = iota
	// JSON outputs the diffs in json
	JSON
)

Jump to

Keyboard shortcuts

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