Documentation ¶
Index ¶
- type App
- func (a App) All() (AppsResponse, error)
- func (a App) Create(body App) (App, error)
- func (a App) Delete(id string) error
- func (a App) GetVersion(name, v string) (App, error)
- func (a App) GetVersions(name string) (VersionsResponse, error)
- func (a App) One(id string) (AppResponse, error)
- func (a App) Update(id string, body App) (App, error)
- type AppResponse
- type AppsResponse
- type Client
- type Container
- type DockerProperties
- type HealthCheck
- type HealthCheckResult
- type PortMapping
- type Task
- type TasksResponse
- type UpgradeStrategy
- type VersionsResponse
- type Volume
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct { ID string `json:"id"` CMD string `json:"cmd,omitempty" bson:"cmd,omitempty"` Args []string `json:"args,omitempty" bson:"args,omitempty"` CPUS float64 `json:"cpus,omitempty" bson:"cpus"` Mem float64 `json:"mem,omitempty" bson:"mem"` HealthChecks []HealthCheck `json:"healthChecks,omitempty" bson:"healthChecks"` Container Container `json:"container,omitempty" bson:"container"` Ports []int `json:"ports,omitempty" bson:"ports,omitempty"` Instances int `json:"instances,omitempty" bson:"instances,omitempty"` UpgradeStrategy UpgradeStrategy `json:"upgradeStrategy,omitempty" bson:"upgradeStrategy,omitempty"` Version string `json:"version,omitempty" bson:"version,omitempty"` Env map[string]interface{} `json:"env" bson:"env,omitempty"` URIs []string `json:"uris" bson:"uris,omitempty"` DockerImage string `json:"dockerImage" bson:"dockerImage,omitempty"` Tag string `json:"tag" bson:"tag,omitempty"` TasksRunning int `json:"tasksRunning,omitempty" bson:"tasksRunning,omitempty"` TasksStaged int `json:"tasksStaged,omitempty" bson:"tasksStaged,omitempty"` Tasks []Task `json:"tasks,omitempty" bson:"tasks,omitempty"` User string `json:"user,omitempty" bson:"user,omitempty"` // contains filtered or unexported fields }
App is sets the basic app structure
func (App) All ¶
func (a App) All() (AppsResponse, error)
All Returns information about all the apps
func (App) GetVersion ¶
GetVersion gets info about a single version
func (App) GetVersions ¶
func (a App) GetVersions(name string) (VersionsResponse, error)
GetVersions return all the versions of an app
type AppResponse ¶
type AppResponse struct {
App App `json:"app"`
}
AppResponse is the response wrapper for getting information about an app
type AppsResponse ¶
type AppsResponse struct {
Apps []App `json:"apps"`
}
AppsResponse is the response wrapper for getting information about all apps
type Container ¶
type Container struct { Type string `json:"type"` Docker DockerProperties `json:"docker"` Volumes Volume `json:"volumes"` }
Container is the structure for creating a container object
type DockerProperties ¶
type DockerProperties struct { Image string `json:"image"` Network string `json:"network,omitempty"` PortMappings []PortMapping `json:"portMappings,omitempty"` }
DockerProperties is everything to you need to send a docker container
type HealthCheck ¶
type HealthCheck struct { Protocol string `json:"protocol"` Path string `json:"path"` GracePeriodSeconds int `json:"gracePeriodSeconds,omitempty"` IntervalSeconds int `json:"intervalSeconds,omitempty"` PortIndex int `json:"portIndex,omitempty"` TimeoutSeconds int `json:"timeoutSeconds,omitempty"` MaxConsecutiveFailures int `json:"maxConsecutiveFailures,omitempty"` }
HealthCheck is structure for creating a health check
type HealthCheckResult ¶
type HealthCheckResult struct { Alive bool `json:"alive" bson:"alive"` ConsecutiveFailures int `json:"consecutiveFailures" bson:"consecutiveFailures"` FirstSuccess string `json:"firstSuccess" bson:"firstSuccess"` LastFailure string `json:"lastFailure,omitempty" bson:"lastFailure"` LastSuccess string `json:"lastSuccess" bson:"lastSuccess"` TaskID string `json:"taskId" bson:"taskId"` }
HealthCheckResult is the structure of the status check
type PortMapping ¶
type PortMapping struct { ContainerPort int `json:"containerPort"` HostPort int `json:"hostPort"` ServicePort int `json:"servicePort"` Protocol string `json:"protocol"` }
PortMapping is used to map ports
type Task ¶
type Task struct { AppID string `json:"appId" bson:"appId"` Host string `json:"host" bson:"host"` ID string `json:"id" bson:"id"` Ports []int `json:"ports" bson:"ports"` StagedAt string `json:"stagedAt" bson:"stagedAt"` StartedAt string `json:"startedAt" bson:"startedAt"` Version string `json:"version" bson:"version"` HealthCheckResults []HealthCheckResult `json:"healthCheckResults" bson:"healthCheckResults"` // contains filtered or unexported fields }
Task is the structure of a task in app response
func (Task) List ¶
func (t Task) List() (TasksResponse, error)
List lists all the current running tasks
type TasksResponse ¶
type TasksResponse struct {
Tasks []Task `json:"tasks" bson:"tasks"`
}
TasksResponse is the object returned from marathon
type UpgradeStrategy ¶
type UpgradeStrategy struct {
MinimumHealthCapacity float64 `json:"minimumHealthCapacity"`
}
UpgradeStrategy allsow your to set your deploy
type VersionsResponse ¶
type VersionsResponse struct {
Versions []string `json:"versions"`
}
VersionsResponse is the response wrapper for getting information about all apps