Documentation ¶
Index ¶
- Constants
- func GetLocation(p *v1client.PeriodicConfig) (*time.Location, error)
- func NewDeployer(client *v1.Client, cfg *CLIConfig) runner.Runner
- type CLIConfig
- type PlanCLIConfig
- type RunCLIConfig
- type Runner
- func (r *Runner) CanonicalizeTemplates() []*errors.WrappedUIContext
- func (r *Runner) CheckForConflicts(errCtx *errors.UIErrorContext) []*errors.WrappedUIContext
- func (r *Runner) Deploy(ui terminal.UI, errorContext *errors.UIErrorContext) *errors.WrappedUIContext
- func (r *Runner) DestroyDeployment(ui terminal.UI) []*errors.WrappedUIContext
- func (r *Runner) Name() string
- func (r *Runner) ParseTemplates() []*errors.WrappedUIContext
- func (r *Runner) ParsedTemplates() interface{}
- func (r *Runner) PlanDeployment(ui terminal.UI, errCtx *errors.UIErrorContext) (int, []*errors.WrappedUIContext)
- func (r *Runner) SetRunnerConfig(cfg *runner.Config)
- func (r *Runner) SetTemplates(templates map[string]string)
Constants ¶
const ( PackPathKey = "pack.path" PackNameKey = "pack.name" PackRegistryKey = "pack.registry" PackDeploymentNameKey = "pack.deployment_name" PackJobKey = "pack.job" PackRefKey = "pack.version" )
Variables ¶
This section is empty.
Functions ¶
func GetLocation ¶
func GetLocation(p *v1client.PeriodicConfig) (*time.Location, error)
func NewDeployer ¶
NewDeployer returns the job implementation of deploy.Deployer. This is responsible for handling packs that contain job specifications.
TODO(jrasell): design a nice method to have the QueryOpts setup once and
available to all subsystems that use a Nomad client.
Types ¶
type CLIConfig ¶
type CLIConfig struct { RunConfig *RunCLIConfig PlanConfig *PlanCLIConfig }
CLIConfig contains all possible configurations required by the Nomad Pack CLI in order to render, plan, run, and destroy job templates.
type PlanCLIConfig ¶
PlanCLIConfig specifies the configuration that is used by the Nomad Pack plan command.
type RunCLIConfig ¶
type RunCLIConfig struct { CheckIndex uint64 ConsulToken string ConsulNamespace string VaultToken string VaultNamespace string EnableRollback bool HCL1 bool PreserveCounts bool PolicyOverride bool }
RunCLIConfig specifies the configuration that is used by the Nomad Pack run command.
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
Runner is the job implementation of the runner.Runner interface.
func (*Runner) CanonicalizeTemplates ¶
func (r *Runner) CanonicalizeTemplates() []*errors.WrappedUIContext
CanonicalizeTemplates satisfies the CanonicalizeTemplates function of the runner.Runner interface.
func (*Runner) CheckForConflicts ¶
func (r *Runner) CheckForConflicts(errCtx *errors.UIErrorContext) []*errors.WrappedUIContext
func (*Runner) Deploy ¶
func (r *Runner) Deploy(ui terminal.UI, errorContext *errors.UIErrorContext) *errors.WrappedUIContext
Deploy satisfies the Deploy function of the runner.Runner interface.
func (*Runner) DestroyDeployment ¶
func (r *Runner) DestroyDeployment(ui terminal.UI) []*errors.WrappedUIContext
func (*Runner) ParseTemplates ¶
func (r *Runner) ParseTemplates() []*errors.WrappedUIContext
ParseTemplates satisfies the ParseTemplates function of the deploy.Deployer interface.
func (*Runner) ParsedTemplates ¶
func (r *Runner) ParsedTemplates() interface{}
ParsedTemplates satisfies the GetParsedTemplates function of the runner.Runner interface.
func (*Runner) PlanDeployment ¶
func (r *Runner) PlanDeployment(ui terminal.UI, errCtx *errors.UIErrorContext) (int, []*errors.WrappedUIContext)
PlanDeployment satisfies the PlanDeployment function of the runner.Runner interface.
func (*Runner) SetRunnerConfig ¶
SetRunnerConfig satisfies the SetRunnerConfig function of the runner.Runner interface.
func (*Runner) SetTemplates ¶
SetTemplates satisfies the SetTemplates function of the runner.Runner interface.