Documentation ¶
Index ¶
- func ToClientKey(res ezkube.ResourceId) client.ObjectKey
- type Client
- type ClusterSnapshot
- func (cs ClusterSnapshot) Clone(selectors ...GVKSelectorFunc) ClusterSnapshot
- func (cs ClusterSnapshot) Delete(cluster string, gvk schema.GroupVersionKind, id types.NamespacedName)
- func (s ClusterSnapshot) ForEachObject(...)
- func (cs ClusterSnapshot) Insert(cluster string, gvk schema.GroupVersionKind, obj TypedObject)
- func (cs ClusterSnapshot) Merge(toMerge ClusterSnapshot) ClusterSnapshot
- func (cs ClusterSnapshot) ShallowCopy(selectors ...GVKSelectorFunc) ClusterSnapshot
- type GVKSelectorFunc
- type Snapshot
- func (s Snapshot) Clone(selectors ...GVKSelectorFunc) Snapshot
- func (s Snapshot) Delete(gvk schema.GroupVersionKind, id types.NamespacedName)
- func (s Snapshot) ForEachObject(handleObject func(gvk schema.GroupVersionKind, obj TypedObject))
- func (s Snapshot) Insert(gvk schema.GroupVersionKind, obj TypedObject)
- func (s Snapshot) Merge(toMerge Snapshot) Snapshot
- func (s Snapshot) ShallowCopy(selectors ...GVKSelectorFunc) Snapshot
- type TypedObject
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToClientKey ¶
func ToClientKey(res ezkube.ResourceId) client.ObjectKey
Types ¶
type Client ¶
right now this just allows us to generate mocks for the client. (ilackarms): eventually it might make sense to put clients for non-kube backends in this package
type ClusterSnapshot ¶ added in v0.7.17
ClusterSnapshot represents a set of snapshots partitioned by cluster
func (ClusterSnapshot) Clone ¶ added in v0.7.17
func (cs ClusterSnapshot) Clone(selectors ...GVKSelectorFunc) ClusterSnapshot
func (ClusterSnapshot) Delete ¶ added in v0.7.17
func (cs ClusterSnapshot) Delete( cluster string, gvk schema.GroupVersionKind, id types.NamespacedName, )
func (ClusterSnapshot) ForEachObject ¶ added in v0.7.17
func (s ClusterSnapshot) ForEachObject( handleObject func( cluster string, gvk schema.GroupVersionKind, obj TypedObject, ), )
func (ClusterSnapshot) Insert ¶ added in v0.7.17
func (cs ClusterSnapshot) Insert(cluster string, gvk schema.GroupVersionKind, obj TypedObject)
func (ClusterSnapshot) Merge ¶ added in v0.21.1
func (cs ClusterSnapshot) Merge(toMerge ClusterSnapshot) ClusterSnapshot
Merges the ClusterSnapshot with a ClusterSnapshot passed in as an argument. If a cluster exists in both ClusterSnapshots, then both Snapshots for the cluster is merged; with the passed in ClusterSnapshot's corresponding Snapshot taking precedence in case of conflicts.
func (ClusterSnapshot) ShallowCopy ¶ added in v0.23.5
func (cs ClusterSnapshot) ShallowCopy(selectors ...GVKSelectorFunc) ClusterSnapshot
type GVKSelectorFunc ¶ added in v0.19.9
type GVKSelectorFunc = func(GVK schema.GroupVersionKind) bool
type Snapshot ¶ added in v0.7.17
type Snapshot map[schema.GroupVersionKind]map[types.NamespacedName]TypedObject
Snapshot represents a generic snapshot of client.Objects scoped to a single cluster
func (Snapshot) Clone ¶ added in v0.7.17
func (s Snapshot) Clone(selectors ...GVKSelectorFunc) Snapshot
func (Snapshot) Delete ¶ added in v0.7.17
func (s Snapshot) Delete(gvk schema.GroupVersionKind, id types.NamespacedName)
func (Snapshot) ForEachObject ¶ added in v0.7.17
func (s Snapshot) ForEachObject(handleObject func(gvk schema.GroupVersionKind, obj TypedObject))
func (Snapshot) Insert ¶ added in v0.7.17
func (s Snapshot) Insert(gvk schema.GroupVersionKind, obj TypedObject)
func (Snapshot) Merge ¶ added in v0.21.1
Merges the Snapshot with a Snapshot passed in as an argument. The values in the passed in Snapshot will take precedence when there is an object mapped to the same gvk and name in both Snapshots.
func (Snapshot) ShallowCopy ¶ added in v0.23.5
func (s Snapshot) ShallowCopy(selectors ...GVKSelectorFunc) Snapshot
type TypedObject ¶ added in v0.7.17
type TypedObject interface { client.Object SetGroupVersionKind(gvk schema.GroupVersionKind) }
a typed object is a client.Object with a TypeMeta