deployment

package
v1.4.8 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	Action string `json:"action"`
	App    string `json:"app"`
}

Action representation

type CurrentAction

type CurrentAction struct {
	Action                string                 `json:"action"`
	App                   string                 `json:"app"`
	ReadinessCheckResults []ReadinessCheckResult `json:"readinessCheckResults"`
}

CurrentAction holds actions taken by a deployment

type Deployment

type Deployment struct {
	ID             string          `json:"id"`
	Version        time.Time       `json:"version"`
	AffectedApps   []string        `json:"affectedApps"`
	AffectedPods   []string        `json:"affectedPods"`
	Steps          []Step          `json:"steps"`
	CurrentActions []CurrentAction `json:"currentActions"`
	CurrentStep    int             `json:"currentStep"`
	TotalSteps     int             `json:"totalSteps"`
}

Deployment holds Marathons deploys on course

type Deployments

type Deployments struct {
	// contains filtered or unexported fields
}

Deployments is Marathon Deployments implementation

func New

func New(client *marathon.Client) *Deployments

New returns a new instance of Marathon deployments implementation

func (*Deployments) Await

func (md *Deployments) Await(id string, timeout time.Duration) error

Await wait a Marathon deployment finish or timeout

func (*Deployments) Get

func (md *Deployments) Get() (*Deployments, error)

Get allows to establish the internal structures

func (*Deployments) Rollback

func (md *Deployments) Rollback(id string) error

Rollback cancel a Marathon deployment

type LastResponse

type LastResponse struct {
	Body        string `json:"body"`
	ContentType string `json:"contentType"`
	Status      int    `json:"status"`
}

LastResponse holds last response

type ReadinessCheckResult

type ReadinessCheckResult struct {
	TaskID       string       `json:"taskId"`
	LastResponse LastResponse `json:"lastResponse"`
	Name         string       `json:"name"`
	Ready        bool         `json:"ready"`
}

ReadinessCheckResult holds results for tasks

type Step

type Step struct {
	Actions []Action `json:"actions"`
}

Step on actions representation

Jump to

Keyboard shortcuts

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