Documentation ¶
Index ¶
- func RetrieveClusters(manifests string) cluster.Map
- func RetrieveComponents(manifests string) component.List
- func RetrieveHypervisors(manifests string) infra.HypervisorMap
- func WithNamedCluster(clusterName string, clusters cluster.Map, ...) error
- func WithStdinResources(resourceActuator ResourceActuator) error
- func WithStdinResourcesSilent(silentResourceActuator SilentResourceActuator) error
- type ResourceActuator
- type SilentResourceActuator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RetrieveClusters ¶
RetrieveClusters returns a cluster list from the given manifests
func RetrieveComponents ¶
RetrieveComponents returns a component list from the given manifests
func RetrieveHypervisors ¶
func RetrieveHypervisors(manifests string) infra.HypervisorMap
RetrieveHypervisors returns an hypervisor map from the given manifests
func WithNamedCluster ¶
func WithNamedCluster(clusterName string, clusters cluster.Map, withCluster func(*cluster.Cluster) error) error
WithNamedCluster will retrieve the cluster with clusterName, or retrieve the only cluster available if clusterName is empty and clusters has only one registered cluster
func WithStdinResources ¶
func WithStdinResources(resourceActuator ResourceActuator) error
WithStdinResources is a function that will take hypervisors, clusters and components from stdin and call to a resource actuator with them, printing all resulting resources at the end on stdout
func WithStdinResourcesSilent ¶
func WithStdinResourcesSilent(silentResourceActuator SilentResourceActuator) error
WithStdinResourcesSilent is similar to WithStdinResources, only that it won't print the resulting resources after calling to the actuator
Types ¶
type ResourceActuator ¶
type ResourceActuator func(infra.HypervisorMap, cluster.Map, component.List) (component.List, error)
ResourceActuator represents a function that takes an hypervisor map, a cluster map and a component list and performs some kind of logic with them, potentially modifying any of the resources
type SilentResourceActuator ¶
SilentResourceActuator represents a function that takes an hypervisor map, a cluster map and a component list and performs some kind of logic with them