status

package
v2.0.0-snapshot...-58e3a78 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2017 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cmd = models.Command{
	Name:      "status",
	ShortHelp: "Get quick readout of the current status of your associated environment and all of its services",
	LongHelp: "`status` will give a quick readout of your environment's health. " +
		"This includes your environment name, environment ID, and for each service the name, size, build status, deploy status, and service ID. " +
		"Here is a sample command\n\n" +
		"```\ncatalyze -E \"<your_env_alias>\" status\n```",
	CmdFunc: func(settings *models.Settings) func(cmd *cli.Cmd) {
		return func(cmd *cli.Cmd) {
			cmd.Action = func() {
				if _, err := auth.New(settings, prompts.New()).Signin(); err != nil {
					logrus.Fatal(err.Error())
				}
				if err := config.CheckRequiredAssociation(true, true, settings); err != nil {
					logrus.Fatal(err.Error())
				}
				err := CmdStatus(settings.EnvironmentID, New(settings, jobs.New(settings)), environments.New(settings), services.New(settings))
				if err != nil {
					logrus.Fatal(err.Error())
				}
			}
		}
	},
}

Cmd is the contract between the user and the CLI. This specifies the command name, arguments, and required/optional arguments and flags for the command.

Functions

func CmdStatus

func CmdStatus(envID string, is IStatus, ie environments.IEnvironments, iservices services.IServices) error

Types

type IStatus

type IStatus interface {
	Status(env *models.Environment, services *[]models.Service) error
}

IStatus

func New

func New(settings *models.Settings, ij jobs.IJobs) IStatus

New returns an instance of IStatus

type SStatus

type SStatus struct {
	Settings *models.Settings
	Jobs     jobs.IJobs
}

SStatus is a concrete implementation of IStatus

func (*SStatus) Status

func (s *SStatus) Status(env *models.Environment, services *[]models.Service) error

Status prints out all of the non-utility services and their running jobs

Jump to

Keyboard shortcuts

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