Documentation
¶
Index ¶
- Constants
- Variables
- func ContainerRunning(container string, client DockerClient) (bool, error)
- func GetExternalIP() (string, error)
- func ListRunningContainers(client DockerClient, ignoredImages []string) ([]string, error)
- func NewDockerClient() *docker.Client
- func PrintBool(b bool) string
- func PrintGreen(txt string) string
- func PrintRed(txt string) string
- func PrintYellow(txt string) string
- func StopContainer(name string, timeout uint, client DockerClient) error
- type Config
- type DockerClient
- type FrameworkMap
- type Marathon
- type MarathonApp
- type MarathonApps
- type MarathonClient
- type MarathonTask
- type Mesos
- func (m *Mesos) Client() *mesos.Client
- func (m *Mesos) ErrIfNotLeader() error
- func (m *Mesos) Framework(framework string) FrameworkMap
- func (m *Mesos) LoadCluster(c *mesos.Client) error
- func (m *Mesos) LoadClusterInfo(c *mesos.Client) error
- func (m *Mesos) LoadSlaveState(host string, c *mesos.Client) (*MesosSlave, error)
- func (m *Mesos) LoadSlaveStats(host string, c *mesos.Client) (*MesosSlave, error)
- type MesosSlave
Constants ¶
View Source
const CLR_0 = "\x1b[30;1m"
View Source
const CLR_G = "\x1b[32;1m"
View Source
const CLR_N = "\x1b[0m"
View Source
const CLR_R = "\x1b[31;1m"
View Source
const CLR_Y = "\x1b[33;1m"
Variables ¶
View Source
var ( ErrParameterMissing = errors.New("Required command parameters missing from call, please see log for more details") ErrMarathonError = errors.New("An error accoured while querying the Marathon API, please see logs for more details") ErrMesosError = errors.New("An error accoured while querying the Mesos API, please see logs for more details") ErrLeaderRequired = errors.New("This task is required to be run on the cluster leader.") )
Functions ¶
func ContainerRunning ¶
func ContainerRunning(container string, client DockerClient) (bool, error)
TODO (boldfield) :: This is kind of stupid... we shouldn't be loading all running containers TODO (boldfield) :: every time we check for the existance of a single container
func GetExternalIP ¶
func ListRunningContainers ¶
func ListRunningContainers(client DockerClient, ignoredImages []string) ([]string, error)
TODO (boldfield) :: Using this method as a data source for the above method would be nice...
func NewDockerClient ¶
func NewDockerClient() *docker.Client
func PrintGreen ¶
func PrintYellow ¶
func StopContainer ¶
func StopContainer(name string, timeout uint, client DockerClient) error
Types ¶
type DockerClient ¶
type FrameworkMap ¶
type Marathon ¶
type Marathon struct { Host string Apps []marathon.Application // contains filtered or unexported fields }
func (*Marathon) LoadAppTasks ¶
func (m *Marathon) LoadAppTasks(client MarathonClient, a *marathon.Application) error
func (*Marathon) LoadApps ¶
func (m *Marathon) LoadApps(client MarathonClient) error
type MarathonApp ¶
type MarathonApp struct { Id string Tasks []*MarathonTask }
func (*MarathonApp) AddTask ¶
func (a *MarathonApp) AddTask(taskId, slaveId, slaveHost string, mesos, marathon, docker bool) *MarathonTask
func (*MarathonApp) GetTaskById ¶
func (a *MarathonApp) GetTaskById(taskId string) *MarathonTask
type MarathonApps ¶
type MarathonApps struct {
Apps []*MarathonApp
}
func (*MarathonApps) AddApp ¶
func (ma *MarathonApps) AddApp(appId string) *MarathonApp
func (*MarathonApps) AddTask ¶
func (ma *MarathonApps) AddTask(taskId, appId, slaveId, slaveHost string, mesos, marathon, docker bool) *MarathonTask
func (*MarathonApps) GetAppById ¶
func (ma *MarathonApps) GetAppById(appId string) *MarathonApp
type MarathonClient ¶
type MarathonTask ¶
type Mesos ¶
func (*Mesos) ErrIfNotLeader ¶
func (*Mesos) Framework ¶
func (m *Mesos) Framework(framework string) FrameworkMap
func (*Mesos) LoadCluster ¶
Loads the entire cluster, including information about slaves
func (*Mesos) LoadClusterInfo ¶
Loads information about the cluster from the master, does not check slaves
func (*Mesos) LoadSlaveState ¶
func (*Mesos) LoadSlaveStats ¶
type MesosSlave ¶
func (*MesosSlave) Framework ¶
func (s *MesosSlave) Framework(framework string) FrameworkMap
Click to show internal directories.
Click to hide internal directories.