Documentation
¶
Index ¶
- func BuildRun(ctx context.Context, app *driver.Application, client client.Client, ...) error
- func CreateOrUpdateApplication(ctx context.Context, client client.Client, app *v1alpha2.Application) error
- func CreateOrUpdateObjects(ctx context.Context, client client.Client, objects []oam.Object) error
- func Delete(envName, appName string) error
- func GetAppConfig(ctx context.Context, c client.Client, app *driver.Application, ...) (*v1alpha2.ApplicationConfiguration, error)
- func GetApplication(ctx context.Context, c client.Client, app *driver.Application, ...) (*v1alpha2.Application, error)
- func GetComponents(app *driver.Application) []string
- func GetServiceConfig(app *driver.Application, componentName string) (string, map[string]interface{})
- func GetTraits(app *driver.Application, componentName string) (map[string]map[string]interface{}, error)
- func GetTraitsByType(app *driver.Application, componentName, traitType string) (map[string]interface{}, error)
- func GetWorkload(app *driver.Application, componentName string) (string, map[string]interface{})
- func IsNotFound(appName string, err error) bool
- func List(envName string) ([]*driver.Application, error)
- func Load(envName, appName string) (*driver.Application, error)
- func MatchAppByComp(envName, compName string) (*driver.Application, error)
- func NewEmptyApplication() (*driver.Application, error)
- func RemoveComponent(app *driver.Application, componentName string) error
- func RemoveTrait(app *driver.Application, componentName, traitType string) error
- func Run(ctx context.Context, client client.Client, app *v1alpha2.Application, ...) error
- func Save(app *driver.Application, envName string) error
- func SetTrait(app *driver.Application, componentName, traitType string, ...) error
- func SetWorkload(app *driver.Application, componentName, workloadType string, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildRun ¶ added in v0.3.0
func BuildRun(ctx context.Context, app *driver.Application, client client.Client, env *types.EnvMeta, io cmdutil.IOStreams) error
BuildRun will build application and deploy from Appfile
func CreateOrUpdateApplication ¶ added in v0.3.0
func CreateOrUpdateApplication(ctx context.Context, client client.Client, app *v1alpha2.Application) error
CreateOrUpdateApplication will create if not exist and update if exists.
func CreateOrUpdateObjects ¶ added in v0.3.0
CreateOrUpdateObjects will create all scopes
func GetAppConfig ¶ added in v0.1.1
func GetAppConfig(ctx context.Context, c client.Client, app *driver.Application, env *types.EnvMeta) (*v1alpha2.ApplicationConfiguration, error)
GetAppConfig will get AppConfig from K8s cluster.
func GetApplication ¶ added in v0.3.0
func GetApplication(ctx context.Context, c client.Client, app *driver.Application, env *types.EnvMeta) (*v1alpha2.Application, error)
GetApplication will get Application from K8s cluster.
func GetComponents ¶ added in v0.3.0
func GetComponents(app *driver.Application) []string
GetComponents will get oam components from Appfile.
func GetServiceConfig ¶ added in v0.3.0
func GetServiceConfig(app *driver.Application, componentName string) (string, map[string]interface{})
GetServiceConfig will get service type and it's configuration
func GetTraits ¶ added in v0.3.0
func GetTraits(app *driver.Application, componentName string) (map[string]map[string]interface{}, error)
GetTraits will list all traits and it's configurations attached to the specified component.
func GetTraitsByType ¶ added in v0.3.0
func GetTraitsByType(app *driver.Application, componentName, traitType string) (map[string]interface{}, error)
GetTraitsByType will get trait configuration with specified component and trait type, we assume one type of trait can only attach to a component once.
func GetWorkload ¶ added in v0.3.0
func GetWorkload(app *driver.Application, componentName string) (string, map[string]interface{})
GetWorkload will get workload type and it's configuration
func IsNotFound ¶ added in v0.2.2
IsNotFound is application not found error
func Load ¶
func Load(envName, appName string) (*driver.Application, error)
Load will load application with env and name from default vela home dir.
func MatchAppByComp ¶
func MatchAppByComp(envName, compName string) (*driver.Application, error)
MatchAppByComp will get application with componentName without AppName.
func NewEmptyApplication ¶ added in v0.2.2
func NewEmptyApplication() (*driver.Application, error)
NewEmptyApplication new empty application, only set tm
func RemoveComponent ¶ added in v0.3.0
func RemoveComponent(app *driver.Application, componentName string) error
RemoveComponent will remove component from Appfile
func RemoveTrait ¶ added in v0.3.0
func RemoveTrait(app *driver.Application, componentName, traitType string) error
RemoveTrait will remove a trait from Appfile
func Run ¶ added in v0.3.0
func Run(ctx context.Context, client client.Client, app *v1alpha2.Application, assistantObjects []oam.Object) error
Run will deploy OAM objects and other assistant K8s Objects including ConfigMap, OAM Scope Custom Resource.
func Save ¶ added in v0.3.0
func Save(app *driver.Application, envName string) error
Save will save appfile into default dir.
func SetTrait ¶ added in v0.3.0
func SetTrait(app *driver.Application, componentName, traitType string, traitData map[string]interface{}) error
SetTrait will set user trait for Appfile
func SetWorkload ¶ added in v0.3.0
func SetWorkload(app *driver.Application, componentName, workloadType string, workloadData map[string]interface{}) error
SetWorkload will set user workload for Appfile
Types ¶
This section is empty.