mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 03:41:45 +00:00
changed arg names from 'pod' to 'resourceQuota'
This commit is contained in:
parent
659fc558f6
commit
89a17a410c
@ -26,18 +26,18 @@ import (
|
||||
|
||||
// Registry is an interface implemented by things that know how to store ResourceQuota objects.
|
||||
type Registry interface {
|
||||
// ListResourceQuotas obtains a list of pods having labels which match selector.
|
||||
// ListResourceQuotas obtains a list of resourceQuotas having labels which match selector.
|
||||
ListResourceQuotas(ctx api.Context, selector labels.Selector) (*api.ResourceQuotaList, error)
|
||||
// Watch for new/changed/deleted pods
|
||||
// Watch for new/changed/deleted resourceQuotas
|
||||
WatchResourceQuotas(ctx api.Context, label labels.Selector, field fields.Selector, resourceVersion string) (watch.Interface, error)
|
||||
// Get a specific pod
|
||||
GetResourceQuota(ctx api.Context, podID string) (*api.ResourceQuota, error)
|
||||
// Create a pod based on a specification.
|
||||
CreateResourceQuota(ctx api.Context, pod *api.ResourceQuota) error
|
||||
// Update an existing pod
|
||||
UpdateResourceQuota(ctx api.Context, pod *api.ResourceQuota) error
|
||||
// Delete an existing pod
|
||||
DeleteResourceQuota(ctx api.Context, podID string) error
|
||||
// Get a specific resourceQuota
|
||||
GetResourceQuota(ctx api.Context, resourceQuotaID string) (*api.ResourceQuota, error)
|
||||
// Create a resourceQuota based on a specification.
|
||||
CreateResourceQuota(ctx api.Context, resourceQuota *api.ResourceQuota) error
|
||||
// Update an existing resourceQuota
|
||||
UpdateResourceQuota(ctx api.Context, resourceQuota *api.ResourceQuota) error
|
||||
// Delete an existing resourceQuota
|
||||
DeleteResourceQuota(ctx api.Context, resourceQuotaID string) error
|
||||
}
|
||||
|
||||
// storage puts strong typing around storage calls
|
||||
@ -63,25 +63,25 @@ func (s *storage) WatchResourceQuotas(ctx api.Context, label labels.Selector, fi
|
||||
return s.Watch(ctx, label, field, resourceVersion)
|
||||
}
|
||||
|
||||
func (s *storage) GetResourceQuota(ctx api.Context, podID string) (*api.ResourceQuota, error) {
|
||||
obj, err := s.Get(ctx, podID)
|
||||
func (s *storage) GetResourceQuota(ctx api.Context, resourceQuotaID string) (*api.ResourceQuota, error) {
|
||||
obj, err := s.Get(ctx, resourceQuotaID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*api.ResourceQuota), nil
|
||||
}
|
||||
|
||||
func (s *storage) CreateResourceQuota(ctx api.Context, pod *api.ResourceQuota) error {
|
||||
_, err := s.Create(ctx, pod)
|
||||
func (s *storage) CreateResourceQuota(ctx api.Context, resourceQuota *api.ResourceQuota) error {
|
||||
_, err := s.Create(ctx, resourceQuota)
|
||||
return err
|
||||
}
|
||||
|
||||
func (s *storage) UpdateResourceQuota(ctx api.Context, pod *api.ResourceQuota) error {
|
||||
_, _, err := s.Update(ctx, pod)
|
||||
func (s *storage) UpdateResourceQuota(ctx api.Context, resourceQuota *api.ResourceQuota) error {
|
||||
_, _, err := s.Update(ctx, resourceQuota)
|
||||
return err
|
||||
}
|
||||
|
||||
func (s *storage) DeleteResourceQuota(ctx api.Context, podID string) error {
|
||||
_, err := s.Delete(ctx, podID, nil)
|
||||
func (s *storage) DeleteResourceQuota(ctx api.Context, resourceQuotaID string) error {
|
||||
_, err := s.Delete(ctx, resourceQuotaID, nil)
|
||||
return err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user