Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
bf14cbf6
Commit
bf14cbf6
authored
Mar 25, 2015
by
Derek Carr
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5930 from markturansky/fix_quota_registry_names
Changed arg names from 'pod' to 'resourceQuota'
parents
529c886f
89a17a41
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
18 deletions
+18
-18
registry.go
pkg/registry/resourcequota/registry.go
+18
-18
No files found.
pkg/registry/resourcequota/registry.go
View file @
bf14cbf6
...
@@ -26,18 +26,18 @@ import (
...
@@ -26,18 +26,18 @@ import (
// Registry is an interface implemented by things that know how to store ResourceQuota objects.
// Registry is an interface implemented by things that know how to store ResourceQuota objects.
type
Registry
interface
{
type
Registry
interface
{
// ListResourceQuotas obtains a list of
pod
s having labels which match selector.
// ListResourceQuotas obtains a list of
resourceQuota
s having labels which match selector.
ListResourceQuotas
(
ctx
api
.
Context
,
selector
labels
.
Selector
)
(
*
api
.
ResourceQuotaList
,
error
)
ListResourceQuotas
(
ctx
api
.
Context
,
selector
labels
.
Selector
)
(
*
api
.
ResourceQuotaList
,
error
)
// Watch for new/changed/deleted
pod
s
// Watch for new/changed/deleted
resourceQuota
s
WatchResourceQuotas
(
ctx
api
.
Context
,
label
labels
.
Selector
,
field
fields
.
Selector
,
resourceVersion
string
)
(
watch
.
Interface
,
error
)
WatchResourceQuotas
(
ctx
api
.
Context
,
label
labels
.
Selector
,
field
fields
.
Selector
,
resourceVersion
string
)
(
watch
.
Interface
,
error
)
// Get a specific
pod
// Get a specific
resourceQuota
GetResourceQuota
(
ctx
api
.
Context
,
pod
ID
string
)
(
*
api
.
ResourceQuota
,
error
)
GetResourceQuota
(
ctx
api
.
Context
,
resourceQuota
ID
string
)
(
*
api
.
ResourceQuota
,
error
)
// Create a
pod
based on a specification.
// Create a
resourceQuota
based on a specification.
CreateResourceQuota
(
ctx
api
.
Context
,
pod
*
api
.
ResourceQuota
)
error
CreateResourceQuota
(
ctx
api
.
Context
,
resourceQuota
*
api
.
ResourceQuota
)
error
// Update an existing
pod
// Update an existing
resourceQuota
UpdateResourceQuota
(
ctx
api
.
Context
,
pod
*
api
.
ResourceQuota
)
error
UpdateResourceQuota
(
ctx
api
.
Context
,
resourceQuota
*
api
.
ResourceQuota
)
error
// Delete an existing
pod
// Delete an existing
resourceQuota
DeleteResourceQuota
(
ctx
api
.
Context
,
pod
ID
string
)
error
DeleteResourceQuota
(
ctx
api
.
Context
,
resourceQuota
ID
string
)
error
}
}
// storage puts strong typing around storage calls
// storage puts strong typing around storage calls
...
@@ -63,25 +63,25 @@ func (s *storage) WatchResourceQuotas(ctx api.Context, label labels.Selector, fi
...
@@ -63,25 +63,25 @@ func (s *storage) WatchResourceQuotas(ctx api.Context, label labels.Selector, fi
return
s
.
Watch
(
ctx
,
label
,
field
,
resourceVersion
)
return
s
.
Watch
(
ctx
,
label
,
field
,
resourceVersion
)
}
}
func
(
s
*
storage
)
GetResourceQuota
(
ctx
api
.
Context
,
pod
ID
string
)
(
*
api
.
ResourceQuota
,
error
)
{
func
(
s
*
storage
)
GetResourceQuota
(
ctx
api
.
Context
,
resourceQuota
ID
string
)
(
*
api
.
ResourceQuota
,
error
)
{
obj
,
err
:=
s
.
Get
(
ctx
,
pod
ID
)
obj
,
err
:=
s
.
Get
(
ctx
,
resourceQuota
ID
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
return
obj
.
(
*
api
.
ResourceQuota
),
nil
return
obj
.
(
*
api
.
ResourceQuota
),
nil
}
}
func
(
s
*
storage
)
CreateResourceQuota
(
ctx
api
.
Context
,
pod
*
api
.
ResourceQuota
)
error
{
func
(
s
*
storage
)
CreateResourceQuota
(
ctx
api
.
Context
,
resourceQuota
*
api
.
ResourceQuota
)
error
{
_
,
err
:=
s
.
Create
(
ctx
,
pod
)
_
,
err
:=
s
.
Create
(
ctx
,
resourceQuota
)
return
err
return
err
}
}
func
(
s
*
storage
)
UpdateResourceQuota
(
ctx
api
.
Context
,
pod
*
api
.
ResourceQuota
)
error
{
func
(
s
*
storage
)
UpdateResourceQuota
(
ctx
api
.
Context
,
resourceQuota
*
api
.
ResourceQuota
)
error
{
_
,
_
,
err
:=
s
.
Update
(
ctx
,
pod
)
_
,
_
,
err
:=
s
.
Update
(
ctx
,
resourceQuota
)
return
err
return
err
}
}
func
(
s
*
storage
)
DeleteResourceQuota
(
ctx
api
.
Context
,
pod
ID
string
)
error
{
func
(
s
*
storage
)
DeleteResourceQuota
(
ctx
api
.
Context
,
resourceQuota
ID
string
)
error
{
_
,
err
:=
s
.
Delete
(
ctx
,
pod
ID
,
nil
)
_
,
err
:=
s
.
Delete
(
ctx
,
resourceQuota
ID
,
nil
)
return
err
return
err
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment