コード例 #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
ファイル: etcd.go プロジェクト: juanluisvaladas/origin
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,
	}
}