Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResourceKey ¶
func ResourceKey(gvk schema.GroupVersionKind) string
Types ¶
type Event ¶
type Event struct { Type string `json:"type"` Reason string `json:"reason"` Message string `json:"message"` }
Event represents an event of Kubernetes.
type State ¶
type State struct { Object *unstructured.Unstructured `json:"object"` Dependents map[string][]*unstructured.Unstructured `json:"dependents,omitempty"` References map[string][]*unstructured.Unstructured `json:"references,omitempty"` Events []Event `json:"events,omitempty"` Requeue bool `json:"requeue,omitempty"` RequeueAfter int `json:"requeueAfter,omitempty"` }
State is passed to and received from handler.
func New ¶
func New(object *unstructured.Unstructured, deps, refs map[string][]*unstructured.Unstructured) *State
NewState returns a new state with specified object.
func (*State) Diff ¶
func (s *State) Diff(ns *State) ([]*unstructured.Unstructured, []*unstructured.Unstructured, []*unstructured.Unstructured)
Diff compares two states and returns lists of modified objects.
Click to show internal directories.
Click to hide internal directories.