compare

package
v0.0.0-...-5f1e80b Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EqualPairs

func EqualPairs(objects [][2]interface{}) bool

func Equals

func Equals(deployed interface{}, requested interface{}) bool

func NewMapBuilder

func NewMapBuilder() *mapBuilder

Types

type MapComparator

type MapComparator struct {
	Comparator ResourceComparator
}

func NewMapComparator

func NewMapComparator() MapComparator

func (*MapComparator) Compare

type ResourceComparator

type ResourceComparator interface {
	SetDefaultComparator(compFunc func(deployed resource.KubernetesResource, requested resource.KubernetesResource) bool)
	GetDefaultComparator() func(deployed resource.KubernetesResource, requested resource.KubernetesResource) bool
	SetComparator(resourceType reflect.Type, compFunc func(deployed resource.KubernetesResource, requested resource.KubernetesResource) bool)
	GetComparator(resourceType reflect.Type) func(deployed resource.KubernetesResource, requested resource.KubernetesResource) bool
	Compare(deployed resource.KubernetesResource, requested resource.KubernetesResource) bool
	CompareArrays(deployed []resource.KubernetesResource, requested []resource.KubernetesResource) ResourceDelta
}

func DefaultComparator

func DefaultComparator() ResourceComparator

func SimpleComparator

func SimpleComparator() ResourceComparator

type ResourceDelta

type ResourceDelta struct {
	Added   []resource.KubernetesResource
	Updated []resource.KubernetesResource
	Removed []resource.KubernetesResource
}

func (*ResourceDelta) HasChanges

func (delta *ResourceDelta) HasChanges() bool

Jump to

Keyboard shortcuts

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