Documentation
¶
Index ¶
- type Interface
- type Inventory
- func (i *Inventory) BuildVmCache(discoveredVmMap map[string]*runtimev1alpha1.VirtualMachine, ...)
- func (i *Inventory) BuildVpcCache(discoveredVpcMap map[string]*runtimev1alpha1.Vpc, ...) error
- func (i *Inventory) DeleteAllVmsFromCache(accountNamespacedName *types.NamespacedName) error
- func (i *Inventory) DeleteVmsFromCache(accountNamespacedName *types.NamespacedName, ...) error
- func (i *Inventory) DeleteVpcsFromCache(namespacedName *types.NamespacedName) error
- func (i *Inventory) GetAllVms() []interface{}
- func (i *Inventory) GetAllVpcs() []interface{}
- func (i *Inventory) GetVmByKey(key string) (*runtimev1alpha1.VirtualMachine, bool)
- func (i *Inventory) GetVmFromIndexer(indexName string, indexedValue string) ([]interface{}, error)
- func (i *Inventory) GetVpcsFromIndexer(indexName string, indexedValue string) ([]interface{}, error)
- func (i *Inventory) UpdateVm(vm *runtimev1alpha1.VirtualMachine) error
- func (i *Inventory) WatchVms(ctx context.Context, key string, labelSelector labels.Selector, ...) (watch.Interface, error)
- func (i *Inventory) WatchVpcs(ctx context.Context, key string, labelSelector labels.Selector, ...) (watch.Interface, error)
- type VMStore
- type VPCStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Inventory ¶
type Inventory struct {
// contains filtered or unexported fields
}
func InitInventory ¶
func InitInventory() *Inventory
InitInventory creates an instance of Inventory struct and initializes inventory with cache indexers.
func (*Inventory) BuildVmCache ¶
func (i *Inventory) BuildVmCache(discoveredVmMap map[string]*runtimev1alpha1.VirtualMachine, accountNamespacedName *types.NamespacedName, selectorNamespacedName *types.NamespacedName)
BuildVmCache builds vm cache for given account using vm list fetched from cloud.
func (*Inventory) BuildVpcCache ¶
func (i *Inventory) BuildVpcCache(discoveredVpcMap map[string]*runtimev1alpha1.Vpc, namespacedName *types.NamespacedName) error
BuildVpcCache builds vpc cache for given account using vpc list fetched from cloud.
func (*Inventory) DeleteAllVmsFromCache ¶ added in v0.6.0
func (i *Inventory) DeleteAllVmsFromCache(accountNamespacedName *types.NamespacedName) error
DeleteAllVmsFromCache deletes all entries from vm cache for a given account.
func (*Inventory) DeleteVmsFromCache ¶
func (i *Inventory) DeleteVmsFromCache(accountNamespacedName *types.NamespacedName, selectorNamespacedName *types.NamespacedName) error
DeleteVmsFromCache deletes all entries from vm cache for a given selector.
func (*Inventory) DeleteVpcsFromCache ¶
func (i *Inventory) DeleteVpcsFromCache(namespacedName *types.NamespacedName) error
DeleteVpcsFromCache deletes all entries from vpc cache for a given account.
func (*Inventory) GetAllVms ¶
func (i *Inventory) GetAllVms() []interface{}
GetAllVms returns all the vms from the vm cache.
func (*Inventory) GetAllVpcs ¶
func (i *Inventory) GetAllVpcs() []interface{}
GetAllVpcs returns all the vpcs from the vpc cache.
func (*Inventory) GetVmByKey ¶
func (i *Inventory) GetVmByKey(key string) (*runtimev1alpha1.VirtualMachine, bool)
GetVmByKey returns vm from vm cache for a given key (namespace/name).
func (*Inventory) GetVmFromIndexer ¶
GetVmFromIndexer returns vms matching the indexedValue for the requested indexName.
func (*Inventory) GetVpcsFromIndexer ¶
func (i *Inventory) GetVpcsFromIndexer(indexName string, indexedValue string) ([]interface{}, error)
GetVpcsFromIndexer returns vpcs matching the indexedValue for the requested indexName.
func (*Inventory) UpdateVm ¶ added in v0.6.0
func (i *Inventory) UpdateVm(vm *runtimev1alpha1.VirtualMachine) error
UpdateVm updates virtual machine object in vm cache.
type VMStore ¶
type VMStore interface { // BuildVmCache builds the vm cache using discoveredVmMap. BuildVmCache(discoveredVmMap map[string]*runtimev1alpha1.VirtualMachine, accountNamespacedName *types.NamespacedName, selectorNamespacedName *types.NamespacedName) // DeleteAllVmsFromCache deletes all vms from the cache for a given account. DeleteAllVmsFromCache(accountNamespacedName *types.NamespacedName) error // DeleteVmsFromCache deletes all vms from the cache for a given selector. DeleteVmsFromCache(accountNamespacedName *types.NamespacedName, selectorNamespacedName *types.NamespacedName) error // GetVmFromIndexer gets all vms from the cache that have a matching index value. GetVmFromIndexer(indexName string, indexedValue string) ([]interface{}, error) // GetAllVms gets all vms from the cache. GetAllVms() []interface{} // GetVmByKey gets the vm that matches the given key. GetVmByKey(key string) (*runtimev1alpha1.VirtualMachine, bool) // WatchVms returns a watch interface on the vm cache for the given selectors. WatchVms(ctx context.Context, key string, labelSelector labels.Selector, fieldSelector fields.Selector) (watch.Interface, error) // UpdateVm updates virtual machine object in vm cache. UpdateVm(vm *runtimev1alpha1.VirtualMachine) error }
type VPCStore ¶
type VPCStore interface { // BuildVpcCache builds the vpc cache using discoveredVpcMap. BuildVpcCache(discoveredVpcMap map[string]*runtimev1alpha1.Vpc, namespacedName *types.NamespacedName) error // DeleteVpcsFromCache deletes all vpcs from the cache. DeleteVpcsFromCache(namespacedName *types.NamespacedName) error // GetVpcsFromIndexer gets all vpcs from the cache that have a matching index value. GetVpcsFromIndexer(indexName string, indexedValue string) ([]interface{}, error) // GetAllVpcs gets all vpcs from the cache. GetAllVpcs() []interface{} // WatchVpcs returns a watch interface on the vpc cache for the given selectors. WatchVpcs(ctx context.Context, key string, labelSelector labels.Selector, fieldSelector fields.Selector) (watch.Interface, error) }