Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetClusterOperation ¶
func SetClusterOperation(o ClusterOperation)
SetClusterOperation set up a new ClusterOperation
Types ¶
type ClusterOperation ¶
type ClusterOperation interface { // GetServicePackageByName get the service package CR by its name. This method will return the ServicePackage // if existed. GetServicePackageByName(name, namespace string) (enginev1alpha1.ServicePackage, bool, error) // DoesCustomResourceExist will use resource's schema.GroupVersion to find the cr in this cluster DoesCustomResourceExist(gv schema.GroupVersion, plural, name, namespace string) (bool, error) // DeployCustomResource will install the custom resource into cluster DeployCustomResource(gvr schema.GroupVersionResource, namespace string, resource interface{}) error // UpdateCustomResource will update the custom resource into cluster UpdateCustomResource(gvr schema.GroupVersionResource, namespace string, resource interface{}) error // DeleteCustomResource will delete the custom resource from cluster DeleteCustomResource(gvr schema.GroupVersionResource, name, namespace string) error // IsNamespaceExist will check cluster namespace is existed, true means is exists IsNamespaceExist(namespace string) (bool, error) }
ClusterOperation the interface of all cluster actions' operation
func GetClusterOperation ¶
func GetClusterOperation() ClusterOperation
GetClusterOperation return an ClusterOperation of this interface
Click to show internal directories.
Click to hide internal directories.