coordinator

package
v0.0.0-...-9ad3809 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2019 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateKfAppCfgFile

func CreateKfAppCfgFile(d *kfdefsv2.KfDef) (string, error)

CreateKfAppCfgFile will create the application directory and persist the KfDef to it as app.yaml. Returns an error if the app.yaml file already exists Returns path to the app.yaml file.

func CreateKfDefFromOptions

func CreateKfDefFromOptions(options map[string]interface{}) (*kfdefsv2.KfDef, error)

CreateKfDefFromOptions creates a KfDef from the supplied options.

func LoadKfApp

func LoadKfApp(options map[string]interface{}) (kftypes.KfApp, error)

LoadKfApp is called from subcommands Apply, Delete, Generate and assumes the existence of an app.yaml file which was created by the Init subcommand. It sets options needed by these subcommands

TODO(jlewi): This method is deprecated. It is providing backwards compatibility with existing call sites. New callers should use LoadKfAppCfgFile to load it from a file. If callers need to modify KfDef they should modify it and then serialize to disk.

func LoadKfAppCfgFile

func LoadKfAppCfgFile(cfgfile string) (kftypes.KfApp, error)

LoadKfAppCfgFile constructs a KfApp by loading the provided app.yaml file.

func NewKfApp

func NewKfApp(options map[string]interface{}) (kftypes.KfApp, error)

NewKfApp is called from the Init subcommand and will create a directory based on the path/name argument given to the Init subcommand

Types

type Builder

type Builder interface {
	LoadKfAppCfgFile(cfgFile string) (kftypes.KfApp, error)
}

Builder defines the methods used to create KfApps. Primary purpose is to allow injecting a fake for use in testing.

type DefaultBuilder

type DefaultBuilder struct {
}

func (*DefaultBuilder) LoadKfAppCfgFile

func (b *DefaultBuilder) LoadKfAppCfgFile(cfgFile string) (kftypes.KfApp, error)

type KfDefGetter

type KfDefGetter interface {
	GetKfDef() *kfdefsv2.KfDef
	GetPlugin(name string) (kftypes.KfApp, bool)
}

Directories

Path Synopsis
package fake provides a fake implementation of the coordinator for use in tests
package fake provides a fake implementation of the coordinator for use in tests

Jump to

Keyboard shortcuts

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