job

package
v0.0.1-techpreview1 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2021 License: MPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
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

func NewDeployer(client *v1.Client, cfg *CLIConfig) runner.Runner

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

type PlanCLIConfig struct {
	HCL1           bool
	PolicyOverride bool
	Verbose        bool
	Diff           bool
}

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) Name

func (r *Runner) Name() string

Name satisfies the Name function of the runner.Runner interface.

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

func (r *Runner) SetRunnerConfig(cfg *runner.Config)

SetRunnerConfig satisfies the SetRunnerConfig function of the runner.Runner interface.

func (*Runner) SetTemplates

func (r *Runner) SetTemplates(templates map[string]string)

SetTemplates satisfies the SetTemplates function of the runner.Runner interface.

Jump to

Keyboard shortcuts

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