application

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2020 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateOrUpdateAppConfig

func CreateOrUpdateAppConfig(ctx context.Context, client client.Client, appConfig *v1alpha2.ApplicationConfiguration) error

func CreateOrUpdateComponent

func CreateOrUpdateComponent(ctx context.Context, client client.Client, comp *v1alpha2.Component) error

func CreateScopes

func CreateScopes(ctx context.Context, client client.Client, scopes []oam.Object) error

func Delete

func Delete(envName, appName string) error

Types

type Application

type Application struct {
	*appfile.AppFile `json:",inline"`
	// contains filtered or unexported fields
}

func List

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

func Load

func Load(envName, appName string) (*Application, error)

func LoadFromFile

func LoadFromFile(fileName string) (*Application, error)

func MatchAppByComp

func MatchAppByComp(envName, compName string) (*Application, error)

func (*Application) BuildRun added in v0.0.9

func (app *Application) BuildRun(ctx context.Context, client client.Client, env *types.EnvMeta, io cmdutil.IOStreams) error

func (*Application) GetComponents

func (app *Application) GetComponents() []string

func (*Application) GetServiceConfig added in v0.0.8

func (app *Application) GetServiceConfig(componentName string) (string, map[string]interface{})

func (*Application) GetTraitNames

func (app *Application) GetTraitNames(componentName string) ([]string, error)

func (*Application) GetTraits

func (app *Application) GetTraits(componentName string) (map[string]map[string]interface{}, error)

func (*Application) GetTraitsByType

func (app *Application) GetTraitsByType(componentName, traitType string) (map[string]interface{}, error)

func (*Application) GetWorkload

func (app *Application) GetWorkload(componentName string) (string, map[string]interface{})

func (*Application) OAM

TODO(wonderflow) add scope support here

func (*Application) RemoveComponent

func (app *Application) RemoveComponent(componentName string) error

func (*Application) RemoveTrait

func (app *Application) RemoveTrait(componentName, traitType string) error

func (*Application) Run

func (app *Application) Run(ctx context.Context, client client.Client,
	ac *v1alpha2.ApplicationConfiguration, comps []*v1alpha2.Component, scopes []oam.Object) error

func (*Application) Save

func (app *Application) Save(envName string) error

func (*Application) SetTrait

func (app *Application) SetTrait(componentName, traitType string, traitData map[string]interface{}) error

func (*Application) SetWorkload

func (app *Application) SetWorkload(componentName, workloadType string, workloadData map[string]interface{}) error

func (*Application) Validate

func (app *Application) Validate() error

Jump to

Keyboard shortcuts

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