Documentation ¶
Overview ¶
Package marathon provides a scheduler using the Marathon REST API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppsMessage ¶
type AppsMessage struct {
Apps []App `json:"apps"`
}
AppsMessage from the Marathon API.
type MarathonScheduler ¶
type MarathonScheduler struct {
// contains filtered or unexported fields
}
MarathonScheduler holds Marathon API URL and a Backoff struct for each task.
func NewScheduler ¶
func NewScheduler(marathonAPI string, demandUpdate chan struct{}) *MarathonScheduler
NewScheduler returns a pointer to the scheduler.
func (*MarathonScheduler) Cleanup ¶
func (m *MarathonScheduler) Cleanup() error
Cleanup gives the scheduler an opportunity to stop anything that needs to be stopped
func (*MarathonScheduler) CountAllTasks ¶
func (m *MarathonScheduler) CountAllTasks(running *demand.Tasks) error
CountAllTasks tells us how many instances of each task are currently running.
func (*MarathonScheduler) InitScheduler ¶
func (m *MarathonScheduler) InitScheduler(task *demand.Task) (err error)
InitScheduler initializes the scheduler.
func (*MarathonScheduler) StopStartTasks ¶
func (m *MarathonScheduler) StopStartTasks(tasks *demand.Tasks) error
StopStartTasks by calling the Marathon scaling API.
Click to show internal directories.
Click to hide internal directories.