Documentation ¶
Index ¶
- Constants
- func CreateCanaryRouteName(appname string) (routename string)
- func GetRegistry() map[string]CommandRunnable
- func Register(cmdName string, canaryRunnable CommandRunnable)
- type AppStatus
- type BlueGreenDeploy
- type CanaryDeploy
- type CanaryPromote
- type CfZddCmd
- type CmdRunner
- type CommandRunnable
- type DomainList
- type HelpCmd
- type Route
- type ScaleoverCmd
- func (cmd *ScaleoverCmd) AppsShareARoute() bool
- func (cmd *ScaleoverCmd) ErrorIfNoSharedRoute() error
- func (cmd *ScaleoverCmd) GetAppStatus(name string) (*AppStatus, error)
- func (cmd *ScaleoverCmd) ParseTime(duration string) (time.Duration, error)
- func (cmd *ScaleoverCmd) Run() (err error)
- func (cmd *ScaleoverCmd) ScaleoverCommand() (err error)
- func (cmd *ScaleoverCmd) SetArgs(args *CfZddCmd)
- func (cmd *ScaleoverCmd) ShouldEnforceRoutes() bool
- func (cmd *ScaleoverCmd) Usage(args *CfZddCmd) error
- type ZddDeploy
Constants ¶
const ( CanaryRouteSuffix = "canary" CanaryRouteSeparator = "-" )
const - exported constants
const BlueGreenCmdName = "blue-green"
const (
CanaryDeployCmdName = "deploy-canary"
)
CanaryDeployCmdName - constants
const (
CanaryPromoteCmdName = "promote-canary"
)
Constants - constants for objects
const HelpCommandName = "zdd-help"
HelpCommandName - constant to set command name text
const (
ScaleoverCmdName = "scaleover"
)
ScaleoverCmdName - constants
const (
ZddDeployCmdName = "deploy-zdd"
)
ZddDeployCmdName - constants
Variables ¶
This section is empty.
Functions ¶
func CreateCanaryRouteName ¶
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 ¶
CanaryDeploy - struct
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) 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 CommandRunnable ¶
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
type Route ¶
type Route struct {
// contains filtered or unexported fields
}
Route - to hold the hostname and domain
type ScaleoverCmd ¶
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) 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