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() ([]string, error) CreateComponent(name string, text string, params param.Params, templateType prototype.TemplateType) error DeleteComponent(name string) 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, nsName string) (map[string]param.Params, error) SetEnvironmentParams(env, component string, params param.Params) error // Environment API. CreateEnvironment(name, uri, namespace, spec string) error DeleteEnvironment(name string) error GetEnvironments() (map[string]env.Env, error) GetEnvironment(name string) (*env.Env, error) SetEnvironment(name, desiredName string) error GetDestination(envName string) (env.Destination, error) // Dependency/registry API. AddRegistry(name, protocol, uri, version string) (*registry.Spec, error) GetRegistry(name string) (*registry.Spec, string, error) GetPackage(registryName, libID string) (*parts.Spec, error) CacheDependency(registryName, libID, libName, libVersion string) (*parts.Spec, error) GetDependency(libName string) (*parts.Spec, error) GetAllPrototypes() (prototype.SpecificationSchemas, 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.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.