Documentation
¶
Index ¶
Constants ¶
View Source
const (
// ComponentsExtCodeKey is the ExtCode key for component imports
ComponentsExtCodeKey = "__ksonnet/components"
// EnvExtCodeKey is the ExtCode key for importing environment metadata
EnvExtCodeKey = "__ksonnet/environments"
// ParamsExtCodeKey is the ExtCode key for importing component parameters
ParamsExtCodeKey = "__ksonnet/params"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager interface {
// App returns the object for the application.
App() (app.App, error)
Root() string
LibPaths() (envPath, vendorPath string)
EnvPaths(env string) (libPath, mainPath, paramsPath string, err error)
// Components API.
ComponentPaths() ([]string, error)
GetAllComponents() ([]component.Component, error)
CreateComponent(name string, text string, params param.Params, templateType prototype.TemplateType) error
// Params API.
SetComponentParams(component string, params param.Params) error
GetComponentParams(name string) (param.Params, error)
GetAllComponentParams(cwd string) (map[string]param.Params, error)
// GetEnvironmentParams will take the name of an environment and return a
// mapping of parameters of the form:
// componentName => {param key => param val}
// i.e.: "nginx" => {"replicas" => 1, "name": "nginx"}
GetEnvironmentParams(name, module string) (map[string]param.Params, error)
SetEnvironmentParams(env, component string, params param.Params) error
}
Manager abstracts over a ksonnet application's metadata, allowing users to do things like: create and delete environments; search for prototypes; vendor libraries; and other non-core-application tasks.
Click to show internal directories.
Click to hide internal directories.