Documentation ¶
Index ¶
- Constants
- Variables
- func AddCapabilityCenter(capName, capURL, capToken string) error
- func AddCapabilityIntoCluster(c client.Client, capability string) (string, error)
- func AddOrUpdateTrait(env *types.EnvMeta, appName string, componentName string, ...) (*application.Application, error)
- func AttachTrait(c *gin.Context, body apis.TraitBody) (string, error)
- func BaseComplete(envName string, workloadName string, appName string, flagSet *pflag.FlagSet, ...) (*application.Application, error)
- func BaseRun(staging bool, app *application.Application, kubeClient client.Client, ...) (string, error)
- func CheckInstallStatus(repoName string, tmp types.Capability) string
- func ConvertApplyTo(applyTo []string, workloads []types.Capability) []string
- func DetachTrait(c *gin.Context, envName string, traitType string, componentName string, ...) (string, error)
- func GatherWorkloads(templates []types.Capability) []types.Capability
- func GetServicesWhenDescribingApplication(cmd *cobra.Command, app *application.Application) ([]string, error)
- func GetStatusFromObject(resource *unstructured.Unstructured) (string, error)
- func GetSyncedCapabilities(repoName, addonName string) (types.Capability, error)
- func GetTraitDefinition(workloadName *string, capabilityAlias string) (types.Capability, error)
- func GetUnstructured(ctx context.Context, c client.Client, ns string, ...) (*unstructured.Unstructured, error)
- func In(l []string, v string) bool
- func InitKubeClient() (client.Client, error)
- func InstallCapability(client client.Client, centerName, capabilityName string, ...) error
- func InstallHelmChart(ioStreams cmdutil.IOStreams, c types.Chart) error
- func ListApplicationConfigurations(ctx context.Context, c client.Client, opt Option) (corev1alpha2.ApplicationConfigurationList, error)
- func ListApplications(ctx context.Context, c client.Client, opt Option) ([]apis.ApplicationMeta, error)
- func ListCapabilities(capabilityCenterName string) ([]types.Capability, error)
- func ListCapabilityCenters() ([]apis.CapabilityCenterMeta, error)
- func ListCenterCapabilities(repoDir string) ([]types.Capability, error)
- func ListComponents(ctx context.Context, c client.Client, opt Option) ([]apis.ComponentMeta, error)
- func ListTraitDefinitions(workloadName *string) ([]types.Capability, error)
- func LoadIfExist(envName string, workloadName string, appGroup string) (*application.Application, error)
- func Parse(applyTo string) string
- func PrepareDetachTrait(envName string, traitType string, componentName string, appName string) (*application.Application, error)
- func RemoveCapability(client client.Client, capabilityName string, ioStreams cmdutil.IOStreams) error
- func RemoveCapabilityCenter(centerName string) (string, error)
- func RemoveCapabilityFromCluster(client client.Client, capabilityName string) (string, error)
- func RetrieveApplicationStatusByName(ctx context.Context, c client.Client, applicationName string, namespace string) (apis.ApplicationMeta, error)
- func RetrieveComponent(ctx context.Context, c client.Client, ...) (apis.ComponentMeta, error)
- func SimplifyCapabilityStruct(capabilityList []types.Capability) []apis.TraitMeta
- func SyncCapabilityCenter(capabilityCenterName string) error
- func SyncCapabilityFromCenter(capName, capURL, capToken string) error
- func TraitOperationRun(ctx context.Context, c client.Client, env *types.EnvMeta, ...) (string, error)
- func UninstallCap(client client.Client, cap types.Capability, ioStreams cmdutil.IOStreams) error
- func ValidateAndMutateForCore(traitType, workloadName string, flags *pflag.FlagSet, env *types.EnvMeta) error
- type ApplicationMetaList
- type AutoscalerChecker
- type CheckStatus
- type Checker
- type DefaultChecker
- type DeleteOptions
- type MetricChecker
- type Option
- type RouteChecker
- type RunOptions
Constants ¶
View Source
const ( DefaultChosenAllSvc = "ALL SERVICES" FlagNotSet = "FlagNotSet" FlagIsInvalid = "FlagIsInvalid" FlagIsValid = "FlagIsValid" )
View Source
const ( StatusChecking = "checking" StatusDone = "done" )
Variables ¶
View Source
var (
Scheme = k8sruntime.NewScheme()
)
Functions ¶
func AddCapabilityCenter ¶
func AddOrUpdateTrait ¶
func AddOrUpdateTrait(env *types.EnvMeta, appName string, componentName string, flagSet *pflag.FlagSet, template types.Capability) (*application.Application, error)
AddOrUpdateTrait attach trait to workload
func BaseComplete ¶
func BaseComplete(envName string, workloadName string, appName string, flagSet *pflag.FlagSet, workloadType string) (*application.Application, error)
func CheckInstallStatus ¶
func CheckInstallStatus(repoName string, tmp types.Capability) string
func ConvertApplyTo ¶
func ConvertApplyTo(applyTo []string, workloads []types.Capability) []string
func DetachTrait ¶
func GatherWorkloads ¶
func GatherWorkloads(templates []types.Capability) []types.Capability
func GetServicesWhenDescribingApplication ¶ added in v0.0.9
func GetServicesWhenDescribingApplication(cmd *cobra.Command, app *application.Application) ([]string, error)
GetServicesWhenDescribingApplication gets the target services list either from cli `--svc` flag or from survey
func GetStatusFromObject ¶ added in v0.0.9
func GetStatusFromObject(resource *unstructured.Unstructured) (string, error)
func GetSyncedCapabilities ¶
func GetSyncedCapabilities(repoName, addonName string) (types.Capability, error)
func GetTraitDefinition ¶
func GetTraitDefinition(workloadName *string, capabilityAlias string) (types.Capability, error)
func GetUnstructured ¶ added in v0.0.9
func GetUnstructured(ctx context.Context, c client.Client, ns string, resourceRef runtimev1alpha1.TypedReference) (*unstructured.Unstructured, error)
func InitKubeClient ¶ added in v0.0.8
func InstallCapability ¶
func ListApplicationConfigurations ¶ added in v0.0.8
func ListApplicationConfigurations(ctx context.Context, c client.Client, opt Option) (corev1alpha2.ApplicationConfigurationList, error)
ListApplicationConfigurations lists all OAM ApplicationConfiguration
func ListApplications ¶ added in v0.0.8
func ListApplications(ctx context.Context, c client.Client, opt Option) ([]apis.ApplicationMeta, error)
ListApplications lists all applications
func ListCapabilities ¶
func ListCapabilities(capabilityCenterName string) ([]types.Capability, error)
func ListCapabilityCenters ¶
func ListCapabilityCenters() ([]apis.CapabilityCenterMeta, error)
func ListCenterCapabilities ¶
func ListCenterCapabilities(repoDir string) ([]types.Capability, error)
func ListComponents ¶
func ListTraitDefinitions ¶
func ListTraitDefinitions(workloadName *string) ([]types.Capability, error)
func LoadIfExist ¶
func LoadIfExist(envName string, workloadName string, appGroup string) (*application.Application, error)
func PrepareDetachTrait ¶
func PrepareDetachTrait(envName string, traitType string, componentName string, appName string) (*application.Application, error)
func RemoveCapability ¶
func RemoveCapabilityCenter ¶
func RetrieveComponent ¶ added in v0.0.8
func SimplifyCapabilityStruct ¶
func SimplifyCapabilityStruct(capabilityList []types.Capability) []apis.TraitMeta
func SyncCapabilityCenter ¶
func TraitOperationRun ¶
func UninstallCap ¶
Types ¶
type ApplicationMetaList ¶ added in v0.0.8
type ApplicationMetaList []apis.ApplicationMeta
func (ApplicationMetaList) Len ¶ added in v0.0.8
func (a ApplicationMetaList) Len() int
func (ApplicationMetaList) Less ¶ added in v0.0.8
func (a ApplicationMetaList) Less(i, j int) bool
func (ApplicationMetaList) Swap ¶ added in v0.0.8
func (a ApplicationMetaList) Swap(i, j int)
type AutoscalerChecker ¶ added in v0.0.9
type AutoscalerChecker struct {
// contains filtered or unexported fields
}
func (*AutoscalerChecker) Check ¶ added in v0.0.9
func (d *AutoscalerChecker) Check(ctx context.Context, ref runtimev1alpha1.TypedReference, _ string, appConfig *v1alpha2.ApplicationConfiguration, _ *application.Application) (CheckStatus, string, error)
type CheckStatus ¶ added in v0.0.9
type CheckStatus string
type Checker ¶ added in v0.0.9
type Checker interface {
Check(ctx context.Context, reference runtimev1alpha1.TypedReference, compName string, appConfig *v1alpha2.ApplicationConfiguration, app *application.Application) (CheckStatus, string, error)
}
type DefaultChecker ¶ added in v0.0.9
type DefaultChecker struct {
// contains filtered or unexported fields
}
func (*DefaultChecker) Check ¶ added in v0.0.9
func (d *DefaultChecker) Check(ctx context.Context, reference runtimev1alpha1.TypedReference, compName string, appConfig *v1alpha2.ApplicationConfiguration, app *application.Application) (CheckStatus, string, error)
type DeleteOptions ¶
type DeleteOptions struct { AppName string CompName string Client client.Client Env *types.EnvMeta }
func (*DeleteOptions) DeleteApp ¶
func (o *DeleteOptions) DeleteApp() (string, error)
func (*DeleteOptions) DeleteComponent ¶
func (o *DeleteOptions) DeleteComponent(io cmdutil.IOStreams) (string, error)
type MetricChecker ¶ added in v0.0.9
type MetricChecker struct {
// contains filtered or unexported fields
}
func (*MetricChecker) Check ¶ added in v0.0.9
func (d *MetricChecker) Check(ctx context.Context, reference runtimev1alpha1.TypedReference, _ string, appConfig *v1alpha2.ApplicationConfiguration, _ *application.Application) (CheckStatus, string, error)
type RouteChecker ¶ added in v0.0.9
type RouteChecker struct {
// contains filtered or unexported fields
}
func (*RouteChecker) Check ¶ added in v0.0.9
func (d *RouteChecker) Check(ctx context.Context, reference runtimev1alpha1.TypedReference, _ string, appConfig *v1alpha2.ApplicationConfiguration, _ *application.Application) (CheckStatus, string, error)
type RunOptions ¶
Click to show internal directories.
Click to hide internal directories.