manager

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2016 License: Apache-2.0 Imports: 16 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

func NewDeployer(url string) Deployer

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.

func (*Error) Error

func (e *Error) Error() string

Error returns the string value of an Error.

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

type ExpansionResponse struct {
	Config string `json:"config"`
	Layout string `json:"layout"`
}

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.

Jump to

Keyboard shortcuts

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