Documentation
¶
Index ¶
- func GenerateDirector(boshDirector BoshDirector, loggerBosh boshlog.Logger) (boshdir.Director, error)
- type BoshDirector
- type BoshDirectors
- type BoshSshInstance
- type CommandRunner
- func (a *CommandRunner) FindBoshSshInstances(boshDirector boshdir.Director, jobName Regexp, inDeplNames ...Regexp) ([]BoshSshInstance, error)
- func (a *CommandRunner) Run(director BoshDirector) error
- func (a *CommandRunner) RunCommandByInstance(boshSshInstance BoshSshInstance, commands []string, ...) error
- func (a *CommandRunner) RunCommandByInstances(boshSshInstances []BoshSshInstance, commands []string, ...) error
- func (a *CommandRunner) SshCommandErrToLog(err ssh.ErrCommandSsh)
- func (a *CommandRunner) SshOutputToLog(output string)
- type Config
- type Environment
- type Environments
- type Gateway
- type Regexp
- type Regexps
- type Script
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateDirector ¶
Types ¶
type BoshDirector ¶
type BoshDirector struct {
Name string `yaml:"name"`
ClientId string `yaml:"client_id"`
ClientSecret string `yaml:"client_secret"`
Username string `yaml:"username"`
Password string `yaml:"password"`
DirectorUrl string `yaml:"director_url"`
CACert string `yaml:"ca_cert"`
CACertFile string `yaml:"ca_cert_file"`
RefreshToken string `yaml:"refresh_token,omitempty"`
Gateway Gateway `yaml:"gateway"`
}
func (*BoshDirector) LoadCaCertFile ¶
func (boshDir *BoshDirector) LoadCaCertFile() error
func (*BoshDirector) UnmarshalYAML ¶
func (c *BoshDirector) UnmarshalYAML(unmarshal func(interface{}) error) error
type BoshDirectors ¶
type BoshDirectors []BoshDirector
func (BoshDirectors) FindDirector ¶
func (boshDirs BoshDirectors) FindDirector(name string) BoshDirector
type BoshSshInstance ¶
type BoshSshInstance struct {
Deployment boshdir.Deployment
Instance boshdir.VMInfo
}
func (BoshSshInstance) String ¶
func (i BoshSshInstance) String() string
type CommandRunner ¶
type CommandRunner struct {
// contains filtered or unexported fields
}
func NewCommandRunner ¶
func NewCommandRunner(boshCommanderScript *Script, loggerBosh boshlog.Logger) *CommandRunner
func (*CommandRunner) FindBoshSshInstances ¶
func (a *CommandRunner) FindBoshSshInstances(boshDirector boshdir.Director, jobName Regexp, inDeplNames ...Regexp) ([]BoshSshInstance, error)
func (*CommandRunner) Run ¶
func (a *CommandRunner) Run(director BoshDirector) error
func (*CommandRunner) RunCommandByInstance ¶
func (a *CommandRunner) RunCommandByInstance(boshSshInstance BoshSshInstance, commands []string, connOpts boshssh.ConnectionOpts) error
func (*CommandRunner) RunCommandByInstances ¶
func (a *CommandRunner) RunCommandByInstances(boshSshInstances []BoshSshInstance, commands []string, connOpts boshssh.ConnectionOpts) error
func (*CommandRunner) SshCommandErrToLog ¶
func (a *CommandRunner) SshCommandErrToLog(err ssh.ErrCommandSsh)
func (*CommandRunner) SshOutputToLog ¶
func (a *CommandRunner) SshOutputToLog(output string)
type Config ¶
type Config struct {
Environments Environments `yaml:"environments"`
}
func (*Config) UnmarshalYAML ¶
type Environment ¶
type Environment struct {
URL string `yaml:"url"`
CACert string `yaml:"ca_cert,omitempty"`
Alias string `yaml:"alias,omitempty"`
// Auth
Username string `yaml:"username,omitempty"`
Password string `yaml:"password,omitempty"`
RefreshToken string `yaml:"refresh_token,omitempty"`
}
func (Environment) ToDirector ¶
func (e Environment) ToDirector() BoshDirector
type Environments ¶
type Environments []Environment
func (Environments) FindByNameOrUrl ¶
func (envs Environments) FindByNameOrUrl(ident string) (Environment, error)
type Regexp ¶
func (Regexp) MarshalYAML ¶
func (*Regexp) UnmarshalFlag ¶
func (*Regexp) UnmarshalYAML ¶
type Script ¶
type Script struct {
JobMatch Regexp `yaml:"job_match" long:"job-match" short:"j" value-name:"JOB_MATCH" description:"Job to target"`
Deployments []Regexp `` /* 168-byte string literal not displayed */
Sudo bool `` /* 139-byte string literal not displayed */
Script []string `yaml:"script" long:"script" short:"s" value-name:"SCRIPT" description:"Scripts to run"`
AfterAll []string `` /* 181-byte string literal not displayed */
}
func (*Script) UnmarshalYAML ¶
Click to show internal directories.
Click to hide internal directories.