 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Overview ¶
Package pod provides Registry interface and it's RESTStorage implementation for storing Pod api objects.
Index ¶
- Variables
- func MatchPod(label labels.Selector, field fields.Selector) generic.Matcher
- func PodStatusDecorator(cache PodStatusGetter) rest.ObjectFunc
- func PodStatusReset(cache PodStatusGetter) rest.ObjectFunc
- func PodToSelectableFields(pod *api.Pod) labels.Set
- func ResourceLocation(getter ResourceGetter, ctx api.Context, id string) (string, error)
- type PodStatusGetter
- type Registry
- type ResourceGetter
- type Storage
Constants ¶
This section is empty.
Variables ¶
var StatusStrategy = podStatusStrategy{Strategy}
    var Strategy = podStrategy{api.Scheme, api.SimpleNameGenerator}
    Strategy is the default logic that applies when creating and updating Pod objects via the REST API. TODO: Create other strategies for updating status, bindings, etc
Functions ¶
func MatchPod ¶ added in v0.11.0
MatchPod returns a generic matcher for a given label and field selector.
func PodStatusDecorator ¶ added in v0.11.0
func PodStatusDecorator(cache PodStatusGetter) rest.ObjectFunc
PodStatusDecorator returns a function that updates pod.Status based on the provided pod cache.
func PodStatusReset ¶ added in v0.11.0
func PodStatusReset(cache PodStatusGetter) rest.ObjectFunc
PodStatusReset returns a function that clears the pod cache when the object is deleted.
func PodToSelectableFields ¶ added in v0.7.0
PodToSelectableFields returns a label set that represents the object TODO: fields are not labels, and the validation rules for them do not apply.
func ResourceLocation ¶ added in v0.11.0
ResourceLocation returns a URL to which one can send traffic for the specified pod.
Types ¶
type PodStatusGetter ¶ added in v0.8.0
type PodStatusGetter interface {
	GetPodStatus(namespace, name string) (*api.PodStatus, error)
	ClearPodStatus(namespace, name string)
}
    PodStatusGetter is an interface used by Pods to fetch and retrieve status info.
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)
	// Watch for new/changed/deleted pods
	WatchPods(ctx api.Context, label labels.Selector, field fields.Selector, resourceVersion string) (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.
func NewRegistry ¶ added in v0.11.0
NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic.
type ResourceGetter ¶ added in v0.11.0
ResourceGetter is an interface for retrieving resources by ResourceLocation.
type Storage ¶ added in v0.11.0
type Storage interface {
	apiserver.RESTDeleter
	apiserver.RESTLister
	apiserver.RESTGetter
	apiserver.ResourceWatcher
	Create(ctx api.Context, obj runtime.Object) (runtime.Object, error)
	Update(ctx api.Context, obj runtime.Object) (runtime.Object, bool, error)
}
    Storage is an interface for a standard REST Storage backend TODO: move me somewhere common