Documentation ¶
Index ¶
- func Enqueue(ctx context.Context, c *jasper.Command, q amboy.Queue) error
- func EnqueueForeground(ctx context.Context, c *jasper.Command, q amboy.Queue) error
- func Jobs(c *jasper.Command) ([]amboy.Job, error)
- func JobsForeground(c *jasper.Command) ([]amboy.Job, error)
- func NewDownloadJob(url, path string, force bool) (amboy.Job, error)
- func NewJob(pc jasper.ProcessConstructor, cmd string) amboy.Job
- func NewJobBasic(cmd string) amboy.Job
- func NewJobBasicForeground(opts *options.Create) amboy.Job
- func NewJobExtended(pc jasper.ProcessConstructor, cmd string, env map[string]string, wd string) amboy.Job
- func NewJobForeground(pc jasper.ProcessConstructor, opts *options.Create) amboy.Job
- func RegisterJobs(pc jasper.ProcessConstructor)
- type Job
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Enqueue ¶
Enqueue adds separate jobs to the queue for every operation captured in the command. These operations will execute in parallel. The output of the operations is captured in the body of the job.
func EnqueueForeground ¶
EnqueueForeground adds separate jobs to the queue for every operation captured in the command. These operations will execute in parallel. The output of the commands are logged, using the default grip sender in the foreground.
func Jobs ¶
Jobs returns a slice of jobs for every operation in the command. The output of the commands are captured in the body of the job.
func JobsForeground ¶
JobsForeground returns a slice of jobs for every operation captured in the command. The output of the commands are logged, using the default grip sender in the foreground.
func NewDownloadJob ¶
NewDownloadJob constructs a new amboy-compatible Job that can download and extract (if tarball) a file to the local filesystem. The job has a dependency on the downloaded file's path, and will only execute if that file does not exist, unless the force flag is passed.
func NewJob ¶
func NewJob(pc jasper.ProcessConstructor, cmd string) amboy.Job
NewJob constructs an amboy job that wraps a provided ProcessConstructor. The identifier of the job includes a hash of the command, so running the same command repeatedly may result in job collisions.
Pass the process constructor to allow the amboy jobs to manipulate processes in an existing Manager.
func NewJobBasic ¶
NewJobBasic constructs an amboy job that uses jasper process management internally. The identifier of the job includes a hash of the command, so running the same command repeatedly may result in job collisions.
func NewJobBasicForeground ¶
NewJobBasicForeground creates an amboy job that writes all output linewise to the current processes global grip logging instance with error and output separated by level.
func NewJobExtended ¶
func NewJobExtended(pc jasper.ProcessConstructor, cmd string, env map[string]string, wd string) amboy.Job
NewJobExtended builds a job that creates a process with environment variables and a working directory defined. The identifier of the job includes a hash of the command, so running the same command repeatedly may result in job collisions.
Pass the process constructor to allow the amboy jobs to manipulate processes in an existing Manager.
func NewJobForeground ¶
NewJobForeground creates an amboy job that writes all output linewise to the current processes global grip logging instance with error and output separated by level.
Pass the process constructor to allow the amboy jobs to manipulate processes in an existing Manager.
func RegisterJobs ¶
func RegisterJobs(pc jasper.ProcessConstructor)
RegisterJobs adds factories for the job types provided by these packages to make it possible to dispatch these jobs to a remote/distributed queue.
Types ¶
type Job ¶
Job is an alias for an amboy.Job, mostly for purposes of making the godoc for the package appear reasonable.
func NewJobBasicExtended ¶
NewJobBasicExtended builds a job that creates a process with environment variables and a working directory defined. The identifier of the job includes a hash of the command, so running the same command repeatedly may result in job collisions.
func NewJobOptions ¶
func NewJobOptions(pc jasper.ProcessConstructor, opts *options.Create) Job
NewJobOptions creates a new job using the options to define the parameters of the job. The identifier of the job is the hash of the options structure.
Pass the process constructor to allow the amboy jobs to manipulate processes in an existing Manager.