scheduler

package
v0.0.0-...-ebd413c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 2, 2017 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SwarmWatchTime is the default interval when pulling for changes
	SwarmWatchTimeSec = 10
)

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	AppId  string
	Tasks  []Task
	Labels map[string]string
	Env    map[string]string
}

type BeethovenInstance

type BeethovenInstance struct {
	Host string
	Port int
}

type Scheduler

type Scheduler interface {
	// Watch for changes using streams and make callbacks to the specified
	// handler when apps have been added, removed or health changes.
	Watch(reload chan bool)
	// Shutdown the current stream watching
	Shutdown()
	// FetchApps will find all applications/services from the scheduler source
	FetchApps() (map[string]*App, error)

	// FetchBeethovenInstances will find all beethoven running instances
	FetchBeethovenInstances() ([]*BeethovenInstance, error)
}

func NewScheduler

func NewScheduler(cfg *config.Config, tracker *tracker.Tracker) Scheduler

type Services

type Services []serviceData

func (Services) Len

func (s Services) Len() int

func (Services) Less

func (s Services) Less(i, j int) bool

func (Services) Swap

func (s Services) Swap(i, j int)

type ShutdownChan

type ShutdownChan chan bool

type Task

type Task struct {
	Host         string
	Ports        []int
	ServicePorts []int
	StagedAt     string
	StartedAt    string
	Version      string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL