dcos

package
v0.20.4-rc2 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2021 License: Apache-2.0 Imports: 21 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// SchedName is the name of the dcos scheduler driver implementation
	SchedName = "dcos"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentNode

type AgentNode struct {
	ID         string     `json:"id"`
	Hostname   string     `json:"hostname"`
	Attributes Attributes `json:"attributes"`
}

AgentNode is the agent node in a DC/OS cluster

type ApplicationOps

type ApplicationOps interface {
	// CreateApplication creates an application in Marathon
	CreateApplication(*marathon.Application) (*marathon.Application, error)
	// ValidateAppliation checks if the aplication is running and healthy
	WaitForApplicationStart(string) error
	// GetApplicationTasks gets all the tasks/instances for the application
	GetApplicationTasks(string) ([]marathon.Task, error)
	// KillApplicationTasks kills all tasks of an application
	KillApplicationTasks(string) error
	// DeleteApplication deletes the given application
	DeleteApplication(string) error
	// WaitForApplicationTermination validates if the application is terminated
	WaitForApplicationTermination(string) error
}

ApplicationOps is an interface to perform application operations

type Attributes

type Attributes struct {
	PublicIP string `json:"public_ip"`
}

Attributes are attributes on a mesos node

type GetAgentsResponse

type GetAgentsResponse struct {
	Agents []AgentNode `json:"slaves"`
}

GetAgentsResponse is the response received from get slaves call to mesos

type MarathonOps

type MarathonOps interface {
	ApplicationOps
}

MarathonOps is an interface to perform Marathon related operations

func MarathonClient

func MarathonClient() MarathonOps

MarathonClient returns a singleton instance of MarathonOps type

type MesosOps

type MesosOps interface {
	NodeOps
}

MesosOps is an interface to perform mesos related operations

func MesosClient

func MesosClient() MesosOps

MesosClient returns a singleton instance of MesosOps type

type NodeOps

type NodeOps interface {
	// GetPrivateAgentNodes gets all the private agents in a DC/OS cluster
	GetPrivateAgentNodes() ([]AgentNode, error)
}

NodeOps is an interface to perform node operations

Jump to

Keyboard shortcuts

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