Esempio n. 1
0
func NewStorage(s storage.Interface) DeploymentStorage {
	deploymentRest := NewREST(s)
	deploymentRegistry := deployment.NewRegistry(deploymentRest)

	return DeploymentStorage{
		Deployment: deploymentRest,
		Scale:      &ScaleREST{registry: &deploymentRegistry},
	}
}
Esempio n. 2
0
File: etcd.go Progetto: rrati/origin
func NewStorage(s storage.Interface, storageDecorator generic.StorageDecorator) DeploymentStorage {
	deploymentRest, deploymentStatusRest := NewREST(s, storageDecorator)
	deploymentRegistry := deployment.NewRegistry(deploymentRest)

	return DeploymentStorage{
		Deployment: deploymentRest,
		Status:     deploymentStatusRest,
		Scale:      &ScaleREST{registry: &deploymentRegistry},
	}
}
Esempio n. 3
0
func NewStorage(opts generic.RESTOptions) DeploymentStorage {
	deploymentRest, deploymentStatusRest, deploymentRollbackRest := NewREST(opts)
	deploymentRegistry := deployment.NewRegistry(deploymentRest)

	return DeploymentStorage{
		Deployment: deploymentRest,
		Status:     deploymentStatusRest,
		Scale:      &ScaleREST{registry: deploymentRegistry},
		Rollback:   deploymentRollbackRest,
	}
}