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
61c7beb5
Commit
61c7beb5
authored
Jun 04, 2015
by
Clayton Coleman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add an Enqueue method to framework.Controller
Allows clients to requeue delta events in the event they need to delay processing.
parent
213e7a8a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
controller.go
pkg/controller/framework/controller.go
+10
-0
No files found.
pkg/controller/framework/controller.go
View file @
61c7beb5
...
@@ -106,6 +106,16 @@ func (c *Controller) HasSynced() bool {
...
@@ -106,6 +106,16 @@ func (c *Controller) HasSynced() bool {
return
c
.
reflector
.
LastSyncResourceVersion
()
!=
""
return
c
.
reflector
.
LastSyncResourceVersion
()
!=
""
}
}
// Requeue adds the provided object back into the queue if it does not already exist.
func
(
c
*
Controller
)
Requeue
(
obj
interface
{})
error
{
return
c
.
config
.
Queue
.
AddIfNotPresent
(
cache
.
Deltas
{
cache
.
Delta
{
Type
:
cache
.
Sync
,
Object
:
obj
,
},
})
}
// processLoop drains the work queue.
// processLoop drains the work queue.
// TODO: Consider doing the processing in parallel. This will require a little thought
// TODO: Consider doing the processing in parallel. This will require a little thought
// to make sure that we don't end up processing the same object multiple times
// to make sure that we don't end up processing the same object multiple times
...
...
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