Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Deployer ¶
type Deployer interface { GetConfiguration(cached *common.Configuration) (*common.Configuration, error) CreateConfiguration(configuration *common.Configuration) (*common.Configuration, error) DeleteConfiguration(configuration *common.Configuration) (*common.Configuration, error) PutConfiguration(configuration *common.Configuration) (*common.Configuration, error) }
Deployer abstracts interactions with the expander and deployer services.
func NewDeployer ¶
NewDeployer returns a new initialized Deployer. TODO(vaikas): Add a flag for setting the timeout.
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
Error is an error type that captures errors from the multiple calls to kubectl made for a single configuration.
type ExpandedTemplate ¶
type ExpandedTemplate struct { Config *common.Configuration `json:"config"` Layout *common.Layout `json:"layout"` }
ExpandedTemplate is the structure returned by the expansion service.
type Expander ¶
type Expander interface {
ExpandTemplate(t *common.Template) (*ExpandedTemplate, error)
}
Expander abstracts interactions with the expander and deployer services.
func NewExpander ¶
func NewExpander(url string, tr TypeResolver) Expander
NewExpander returns a new initialized Expander.
type ExpansionResponse ¶
ExpansionResponse describes the results of marshaling an ExpandedTemplate.
func (*ExpansionResponse) Unmarshal ¶
func (er *ExpansionResponse) Unmarshal() (*ExpandedTemplate, error)
Unmarshal creates and returns an ExpandedTemplate from an ExpansionResponse.
type Manager ¶
type Manager interface { // Deployments ListDeployments() ([]common.Deployment, error) GetDeployment(name string) (*common.Deployment, error) CreateDeployment(t *common.Template) (*common.Deployment, error) DeleteDeployment(name string, forget bool) (*common.Deployment, error) PutDeployment(name string, t *common.Template) (*common.Deployment, error) // Manifests ListManifests(deploymentName string) (map[string]*common.Manifest, error) GetManifest(deploymentName string, manifest string) (*common.Manifest, error) Expand(t *common.Template) (*common.Manifest, error) // Types ListTypes() ([]string, error) ListInstances(typeName string) ([]*common.TypeInstance, error) GetRegistryForType(typeName string) (string, error) GetMetadataForType(typeName string) (string, error) // Registries ListRegistries() ([]*common.Registry, error) CreateRegistry(pr *common.Registry) error GetRegistry(name string) (*common.Registry, error) DeleteRegistry(name string) error // Registry Types ListRegistryTypes(registryName string, regex *regexp.Regexp) ([]registry.Type, error) GetDownloadURLs(registryName string, t registry.Type) ([]*url.URL, error) GetFile(registryName string, url string) (string, error) // Credentials CreateCredential(name string, c *common.RegistryCredential) error GetCredential(name string) (*common.RegistryCredential, error) }
Manager manages a persistent set of Deployments.
func NewManager ¶
func NewManager(expander Expander, deployer Deployer, repository repository.Repository, registryProvider registry.RegistryProvider, service common.RegistryService, credentialProvider common.CredentialProvider) Manager
NewManager returns a new initialized Manager.
type TypeResolver ¶
type TypeResolver interface {
ResolveTypes(config *common.Configuration, imports []*common.ImportFile) ([]*common.ImportFile, error)
}
TypeResolver finds Types in a Configuration which aren't yet reduceable to an import file or primitive, and attempts to replace them with a template from a URL.
func NewTypeResolver ¶
func NewTypeResolver(rp registry.RegistryProvider, c util.HTTPClient) TypeResolver
NewTypeResolver returns a new initialized TypeResolver.