Documentation
¶
Overview ¶
Package runtime manages the reflection of Timoni's instances on Kubernetes clusters.
Index ¶
- func NewResourceManager(rcg genericclioptions.RESTClientGetter) (*ssa.ResourceManager, error)
- type InstanceManager
- func (m *InstanceManager) AddObjects(objects []*unstructured.Unstructured) error
- func (m *InstanceManager) Diff(target *apiv1.ResourceInventory) ([]*unstructured.Unstructured, error)
- func (m *InstanceManager) ListMeta() (object.ObjMetadataSet, error)
- func (m *InstanceManager) ListObjects() ([]*unstructured.Unstructured, error)
- func (m *InstanceManager) VersionOf(objMetadata object.ObjMetadata) string
- type StorageManager
- func (s *StorageManager) Apply(ctx context.Context, i *apiv1.Instance, createNamespace bool) error
- func (s *StorageManager) Delete(ctx context.Context, name, namespace string) error
- func (s *StorageManager) Get(ctx context.Context, name, namespace string) (*apiv1.Instance, error)
- func (s *StorageManager) GetStaleObjects(ctx context.Context, i *apiv1.Instance) ([]*unstructured.Unstructured, error)
- func (s *StorageManager) List(ctx context.Context, namespace string) ([]*apiv1.Instance, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewResourceManager ¶
func NewResourceManager(rcg genericclioptions.RESTClientGetter) (*ssa.ResourceManager, error)
NewResourceManager creates a ResourceManager for the given cluster.
Types ¶
type InstanceManager ¶
InstanceManager performs operations on the instance's inventory.
func NewInstanceManager ¶
func NewInstanceManager(name, namespace, values string, moduleRef apiv1.ModuleReference) *InstanceManager
NewInstanceManager creates an InstanceManager for the given module.
func (*InstanceManager) AddObjects ¶
func (m *InstanceManager) AddObjects(objects []*unstructured.Unstructured) error
AddObjects extracts the metadata from the given objects and adds it to the instance inventory.
func (*InstanceManager) Diff ¶
func (m *InstanceManager) Diff(target *apiv1.ResourceInventory) ([]*unstructured.Unstructured, error)
Diff returns the slice of objects that do not exist in the target inventory.
func (*InstanceManager) ListMeta ¶
func (m *InstanceManager) ListMeta() (object.ObjMetadataSet, error)
ListMeta returns the inventory entries as object.ObjMetadata objects.
func (*InstanceManager) ListObjects ¶
func (m *InstanceManager) ListObjects() ([]*unstructured.Unstructured, error)
ListObjects returns the inventory entries as unstructured.Unstructured objects.
func (*InstanceManager) VersionOf ¶
func (m *InstanceManager) VersionOf(objMetadata object.ObjMetadata) string
VersionOf returns the API version of the given object if found in this instance.
type StorageManager ¶
type StorageManager struct {
// contains filtered or unexported fields
}
StorageManager manages the inventory in-cluster storage.
func NewStorageManager ¶
func NewStorageManager(resManager *ssa.ResourceManager) *StorageManager
NewStorageManager creates a storage manager for the given cluster.
func (*StorageManager) Delete ¶
func (s *StorageManager) Delete(ctx context.Context, name, namespace string) error
Delete removes the storage for the given instance name and namespace.
func (*StorageManager) GetStaleObjects ¶
func (s *StorageManager) GetStaleObjects(ctx context.Context, i *apiv1.Instance) ([]*unstructured.Unstructured, error)
GetStaleObjects returns the list of objects metadata subject to pruning.