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
f793ddff
Commit
f793ddff
authored
Oct 28, 2015
by
Dr. Stefan Schimanski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove FIFO dependency from SchedulerLoop
parent
ae4673e8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
9 deletions
+17
-9
schedulerloop.go
contrib/mesos/pkg/scheduler/operations/schedulerloop.go
+17
-9
No files found.
contrib/mesos/pkg/scheduler/operations/schedulerloop.go
View file @
f793ddff
...
@@ -68,9 +68,18 @@ func NewScheduler(c *config.Config, fw types.Framework, client *client.Client, r
...
@@ -68,9 +68,18 @@ func NewScheduler(c *config.Config, fw types.Framework, client *client.Client, r
// an ordering (vs interleaving) of operations that's easier to reason about.
// an ordering (vs interleaving) of operations that's easier to reason about.
q
:=
queuer
.
New
(
podUpdates
)
q
:=
queuer
.
New
(
podUpdates
)
algorithm
:=
NewSchedulerAlgorithm
(
fw
,
podUpdates
)
podDeleter
:=
NewDeleter
(
fw
,
q
)
podDeleter
:=
NewDeleter
(
fw
,
q
)
podReconciler
:=
NewPodReconciler
(
fw
,
client
,
q
,
podDeleter
)
podReconciler
:=
NewPodReconciler
(
fw
,
client
,
q
,
podDeleter
)
bo
:=
backoff
.
New
(
c
.
InitialPodBackoff
.
Duration
,
c
.
MaxPodBackoff
.
Duration
)
errorHandler
:=
NewErrorHandler
(
fw
,
bo
,
q
)
binder
:=
NewBinder
(
fw
)
startLatch
:=
make
(
chan
struct
{})
startLatch
:=
make
(
chan
struct
{})
eventBroadcaster
:=
record
.
NewBroadcaster
()
eventBroadcaster
:=
record
.
NewBroadcaster
()
...
@@ -84,18 +93,17 @@ func NewScheduler(c *config.Config, fw types.Framework, client *client.Client, r
...
@@ -84,18 +93,17 @@ func NewScheduler(c *config.Config, fw types.Framework, client *client.Client, r
podtask
.
InstallDebugHandlers
(
fw
.
Tasks
(),
mux
)
podtask
.
InstallDebugHandlers
(
fw
.
Tasks
(),
mux
)
})
})
return
NewSchedulerLoop
(
c
,
fw
,
client
,
recorder
,
podUpdates
,
q
,
startLatch
),
podReconciler
return
NewSchedulerLoop
(
c
lient
,
algorithm
,
recorder
,
q
.
Yield
,
errorHandler
.
Error
,
binder
,
startLatch
),
podReconciler
}
}
func
NewSchedulerLoop
(
c
*
config
.
Config
,
fw
types
.
Framework
,
client
*
client
.
Client
,
func
NewSchedulerLoop
(
client
*
client
.
Client
,
algorithm
*
SchedulerAlgorithm
,
recorder
record
.
EventRecorder
,
podUpdates
queue
.
FIFO
,
q
*
queuer
.
Queuer
,
recorder
record
.
EventRecorder
,
nextPod
func
()
*
api
.
Pod
,
error
func
(
pod
*
api
.
Pod
,
schedulingErr
error
),
started
chan
<-
struct
{})
*
SchedulerLoop
{
binder
*
Binder
,
started
chan
<-
struct
{})
*
SchedulerLoop
{
bo
:=
backoff
.
New
(
c
.
InitialPodBackoff
.
Duration
,
c
.
MaxPodBackoff
.
Duration
)
return
&
SchedulerLoop
{
return
&
SchedulerLoop
{
algorithm
:
NewSchedulerAlgorithm
(
fw
,
podUpdates
)
,
algorithm
:
algorithm
,
binder
:
NewBinder
(
fw
)
,
binder
:
binder
,
nextPod
:
q
.
Yiel
d
,
nextPod
:
nextPo
d
,
error
:
NewErrorHandler
(
fw
,
bo
,
q
)
.
E
rror
,
error
:
e
rror
,
recorder
:
recorder
,
recorder
:
recorder
,
client
:
client
,
client
:
client
,
started
:
started
,
started
:
started
,
...
...
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