application

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 15, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

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

func CreateOrUpdateObjects(ctx context.Context, client client.Client, objects []oam.Object) error

CreateOrUpdateObjects will create all scopes

func Delete

func Delete(envName, appName string) error

Delete will delete an app along with it's appfile.

func GetAppConfig added in v0.1.1

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

func IsNotFound(appName string, err error) bool

IsNotFound is application not found error

func List

func List(envName string) ([]*driver.Application, error)

List will list all apps

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL