commands

package
v5.0.8+incompatible Latest Latest
Warning

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

Go to latest
Published: May 18, 2018 License: Apache-2.0 Imports: 13 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	CanaryRouteSuffix    = "canary"
	CanaryRouteSeparator = "-"
)

const - exported constants

View Source
const BlueGreenCmdName = "blue-green"
View Source
const (
	CanaryDeployCmdName = "deploy-canary"
)

CanaryDeployCmdName - constants

View Source
const (
	CanaryPromoteCmdName = "promote-canary"
)

Constants - constants for objects

View Source
const HelpCommandName = "zdd-help"

HelpCommandName - constant to set command name text

View Source
const (
	ScaleoverCmdName = "scaleover"
)

ScaleoverCmdName - constants

View Source
const (
	ZddDeployCmdName = "deploy-zdd"
)

ZddDeployCmdName - constants

Variables

This section is empty.

Functions

func CreateCanaryRouteName

func CreateCanaryRouteName(appname string) (routename string)

CreateCanaryRouteName - function to create a properly formatted routename from an appname.

func GetRegistry

func GetRegistry() map[string]CommandRunnable

GetRegistry - function to return the current registry

func Register

func Register(cmdName string, canaryRunnable CommandRunnable)

Register - function to add CommandRunnable to the registry map

Types

type AppStatus

type AppStatus struct {
	Name           string
	GUID           string
	CountRunning   int
	CountRequested int
	State          string
	Routes         []string
}

AppStatus represents the sattus of a app in CF

func (*AppStatus) ScaleDown

func (app *AppStatus) ScaleDown(cliConnection plugin.CliConnection)

func (*AppStatus) ScaleUp

func (app *AppStatus) ScaleUp(cliConnection plugin.CliConnection)

type BlueGreenDeploy

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

BlueGreenDeploy - struct for deployment

func (*BlueGreenDeploy) Run

func (bg *BlueGreenDeploy) Run() (err error)

Run - run method as required by the interface

func (*BlueGreenDeploy) SetArgs

func (bg *BlueGreenDeploy) SetArgs(args *CfZddCmd)

SetArgs - function to set the arguments for the deployment

type CanaryDeploy

type CanaryDeploy struct {
	Utils util.Utilities
	// contains filtered or unexported fields
}

CanaryDeploy - struct

func (*CanaryDeploy) Run

func (s *CanaryDeploy) Run() (err error)

Run - Run method

func (*CanaryDeploy) SetArgs

func (s *CanaryDeploy) SetArgs(args *CfZddCmd)

SetArgs - set command args

type CanaryPromote

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

CanaryPromote - struct

func (*CanaryPromote) RemoveApplication

func (s *CanaryPromote) RemoveApplication(app plugin_models.GetAppModel) (err error)

RemoveApplication - function to remove application

func (*CanaryPromote) Run

func (s *CanaryPromote) Run() (err error)

Run method

func (*CanaryPromote) SetArgs

func (s *CanaryPromote) SetArgs(args *CfZddCmd)

SetArgs - Setter for the args

func (*CanaryPromote) UpdateRoutes

func (s *CanaryPromote) UpdateRoutes(app1 plugin_models.GetAppModel, app2 plugin_models.GetAppModel) (err error)

UpdateRoutes - function to add or remove routes from the application

type CfZddCmd

type CfZddCmd struct {
	Conn            plugin.CliConnection
	CmdName         string
	OldApp          string
	NewApp          string
	ManifestPath    string
	ApplicationPath string
	Duration        string
	CustomURL       string
	BatchSize       int
	RouteCheck      bool
	HelpTopic       string
}

CfZddCmd - struct to initialize.

type CmdRunner

type CmdRunner interface {
	Run() error
}

CmdRunner - interface type

type CommandRunnable

type CommandRunnable interface {
	Run() error
	SetArgs(cmd *CfZddCmd)
}

CommandRunnable - interface type for other commands

type DomainList

type DomainList struct {
	Domain  string   `yaml:"domain,omitempty"`
	Domains []string `yaml:"domains,omitempty"`
}

DomainList - struct

type HelpCmd

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

HelpCmd - struct for HelpCmd

func (*HelpCmd) Run

func (h *HelpCmd) Run() (err error)

Run - run method for help command

func (*HelpCmd) SetArgs

func (h *HelpCmd) SetArgs(args *CfZddCmd)

SetArgs - set args command for help command

type Route

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

Route - to hold the hostname and domain

type ScaleoverCmd

type ScaleoverCmd struct {
	App1   *AppStatus
	App2   *AppStatus
	Args   *CfZddCmd
	Client clientDoer
}

ScaleoverCmd is this plugin

func (*ScaleoverCmd) AppsShareARoute

func (cmd *ScaleoverCmd) AppsShareARoute() bool

func (*ScaleoverCmd) ErrorIfNoSharedRoute

func (cmd *ScaleoverCmd) ErrorIfNoSharedRoute() error

func (*ScaleoverCmd) GetAppStatus

func (cmd *ScaleoverCmd) GetAppStatus(name string) (*AppStatus, error)

func (*ScaleoverCmd) ParseTime

func (cmd *ScaleoverCmd) ParseTime(duration string) (time.Duration, error)

func (*ScaleoverCmd) Run

func (cmd *ScaleoverCmd) Run() (err error)

Run runs the plugin

func (*ScaleoverCmd) ScaleoverCommand

func (cmd *ScaleoverCmd) ScaleoverCommand() (err error)

ScaleoverCommand creates a new instance of this plugin

func (*ScaleoverCmd) SetArgs

func (cmd *ScaleoverCmd) SetArgs(args *CfZddCmd)

SetArgs - arg setter

func (*ScaleoverCmd) ShouldEnforceRoutes

func (cmd *ScaleoverCmd) ShouldEnforceRoutes() bool

func (*ScaleoverCmd) Usage

func (cmd *ScaleoverCmd) Usage(args *CfZddCmd) error

type ZddDeploy

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

ZddDeploy - struct

func (*ZddDeploy) Run

func (s *ZddDeploy) Run() (err error)

Run method

func (*ZddDeploy) SetArgs

func (s *ZddDeploy) SetArgs(args *CfZddCmd)

SetArgs - arg setter

Jump to

Keyboard shortcuts

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