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
89a17a41
Commit
89a17a41
authored
Mar 25, 2015
by
markturansky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changed arg names from 'pod' to 'resourceQuota'
parent
659fc558
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 @
89a17a41
...
...
@@ -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
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
)
// 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
)
// Get a specific
pod
GetResourceQuota
(
ctx
api
.
Context
,
pod
ID
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
,
pod
ID
string
)
error
// Get a specific
resourceQuota
GetResourceQuota
(
ctx
api
.
Context
,
resourceQuota
ID
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
,
resourceQuota
ID
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
,
pod
ID
string
)
(
*
api
.
ResourceQuota
,
error
)
{
obj
,
err
:=
s
.
Get
(
ctx
,
pod
ID
)
func
(
s
*
storage
)
GetResourceQuota
(
ctx
api
.
Context
,
resourceQuota
ID
string
)
(
*
api
.
ResourceQuota
,
error
)
{
obj
,
err
:=
s
.
Get
(
ctx
,
resourceQuota
ID
)
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
,
pod
ID
string
)
error
{
_
,
err
:=
s
.
Delete
(
ctx
,
pod
ID
,
nil
)
func
(
s
*
storage
)
DeleteResourceQuota
(
ctx
api
.
Context
,
resourceQuota
ID
string
)
error
{
_
,
err
:=
s
.
Delete
(
ctx
,
resourceQuota
ID
,
nil
)
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