예제 #1
0
파일: etcd.go 프로젝트: johnmccawley/origin
func NewStorage(s storage.Interface) DeploymentStorage {
	deploymentRest := NewREST(s)
	deploymentRegistry := deployment.NewRegistry(deploymentRest)

	return DeploymentStorage{
		Deployment: deploymentRest,
		Scale:      &ScaleREST{registry: &deploymentRegistry},
	}
}
예제 #2
0
파일: etcd.go 프로젝트: 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},
	}
}
예제 #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,
	}
}