forked from openshift/origin
/
registry.go
19 lines (16 loc) · 852 Bytes
/
registry.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package deploy
import (
kapi "github.com/GoogleCloudPlatform/kubernetes/pkg/api"
"github.com/GoogleCloudPlatform/kubernetes/pkg/labels"
"github.com/GoogleCloudPlatform/kubernetes/pkg/watch"
deployapi "github.com/openshift/origin/pkg/deploy/api"
)
// Registry is an interface for things that know how to store Deployments.
type Registry interface {
ListDeployments(ctx kapi.Context, label, field labels.Selector) (*deployapi.DeploymentList, error)
GetDeployment(ctx kapi.Context, id string) (*deployapi.Deployment, error)
CreateDeployment(ctx kapi.Context, deployment *deployapi.Deployment) error
UpdateDeployment(ctx kapi.Context, deployment *deployapi.Deployment) error
DeleteDeployment(ctx kapi.Context, id string) error
WatchDeployments(ctx kapi.Context, label, field labels.Selector, resourceVersion string) (watch.Interface, error)
}