package pod
import "k8s.io/kubernetes/pkg/registry/pod"
Package pod provides Registry interface and it's RESTStorage implementation for storing Pod api objects.
Index ¶
- type BasicManifestFactory
- type ManifestFactory
- type REST
- func NewREST(config *RESTConfig) *REST
- func (rs *REST) Create(ctx api.Context, obj runtime.Object) (<-chan runtime.Object, error)
- func (rs *REST) Delete(ctx api.Context, id string) (<-chan runtime.Object, error)
- func (rs *REST) Get(ctx api.Context, id string) (runtime.Object, error)
- func (rs *REST) List(ctx api.Context, label, field labels.Selector) (runtime.Object, error)
- func (*REST) New() runtime.Object
- func (rs *REST) Update(ctx api.Context, obj runtime.Object) (<-chan runtime.Object, error)
- func (rs *REST) Watch(ctx api.Context, label, field labels.Selector, resourceVersion string) (watch.Interface, error)
- type RESTConfig
- type Registry
Types ¶
type BasicManifestFactory ¶
type BasicManifestFactory struct { // TODO: this should really point at the API rather than a registry ServiceRegistry service.Registry }
func (*BasicManifestFactory) MakeManifest ¶
func (b *BasicManifestFactory) MakeManifest(machine string, pod api.Pod) (api.ContainerManifest, error)
type ManifestFactory ¶
type ManifestFactory interface { // Make a container object for a given pod, given the machine that the pod is running on. MakeManifest(machine string, pod api.Pod) (api.ContainerManifest, error) }
type REST ¶
type REST struct {
// contains filtered or unexported fields
}
REST implements the RESTStorage interface in terms of a PodRegistry.
func NewREST ¶
func NewREST(config *RESTConfig) *REST
NewREST returns a new REST.
func (*REST) Create ¶
func (*REST) Delete ¶
func (*REST) Get ¶
func (*REST) List ¶
func (*REST) New ¶
func (*REST) Update ¶
func (*REST) Watch ¶
func (rs *REST) Watch(ctx api.Context, label, field labels.Selector, resourceVersion string) (watch.Interface, error)
Watch begins watching for new, changed, or deleted pods.
type RESTConfig ¶
type RESTConfig struct { CloudProvider cloudprovider.Interface PodCache client.PodInfoGetter PodInfoGetter client.PodInfoGetter Registry Registry Minions client.MinionInterface }
type Registry ¶
type Registry interface { // ListPods obtains a list of pods having labels which match selector. ListPods(ctx api.Context, selector labels.Selector) (*api.PodList, error) // ListPodsPredicate obtains a list of pods for which filter returns true. ListPodsPredicate(ctx api.Context, filter func(*api.Pod) bool) (*api.PodList, error) // Watch for new/changed/deleted pods WatchPods(ctx api.Context, resourceVersion string, filter func(*api.Pod) bool) (watch.Interface, error) // Get a specific pod GetPod(ctx api.Context, podID string) (*api.Pod, error) // Create a pod based on a specification. CreatePod(ctx api.Context, pod *api.Pod) error // Update an existing pod UpdatePod(ctx api.Context, pod *api.Pod) error // Delete an existing pod DeletePod(ctx api.Context, podID string) error }
Registry is an interface implemented by things that know how to store Pod objects.
Source Files ¶
doc.go manifest_factory.go registry.go rest.go
- Version
- v0.4.4
- Published
- Nov 19, 2014
- Platform
- js/wasm
- Imports
- 16 packages
- Last checked
- 47 seconds ago –
Tools for package owners.