Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Changes ¶
type Changes[K comparable, T Hasher[K]] struct { // contains filtered or unexported fields }
Changes is the result of the difference between two maps – items that are added and items that are removed This map is used to reconcile state differences.
func Maps ¶
func Maps[K comparable, T Hasher[K]](current, new map[K]T) Changes[K, T]
Maps generates Changes for two maps with the same type signature by checking for any removals and then checking for additions. TODO: This doesn't need to create maps, it can return slices only. This function doesn't need to insert the values.
func NewChanges ¶
func NewChanges[K comparable, T Hasher[K]](additions, removals map[K]T) Changes[K, T]
type Hasher ¶
type Hasher[K comparable] interface { Hash() K }
Click to show internal directories.
Click to hide internal directories.