jobrunner

package
v1.29.1 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package jobrunner provides support for invoking jobs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CFNStackResourceLister

type CFNStackResourceLister interface {
	StackResources(name string) ([]*cloudformation.StackResource, error)
}

CFNStackResourceLister is the interface to list CloudFormation stack resources.

type Config

type Config struct {
	App string // Name of the application.
	Env string // Name of the environment.
	Job string // Name of the job.

	// Dependencies to invoke a job.
	CFN          CFNStackResourceLister // CloudFormation client to list stack resources.
	StateMachine StateMachineExecutor   // StepFunction client to execute a state machine.
}

Config hold the data needed to create a JobRunner.

type JobRunner

type JobRunner struct {
	// contains filtered or unexported fields
}

JobRunner can invoke a job.

func New

func New(cfg *Config) *JobRunner

New creates a new JobRunner.

func (*JobRunner) Run

func (job *JobRunner) Run() error

Run invokes a job. An error is returned if the state machine's ARN can not be derived from the job, or the execution fails.

type StateMachineExecutor

type StateMachineExecutor interface {
	Execute(stateMachineARN string) error
}

StateMachineExecutor is the interface that implements the Execute method to invoke a state machine.

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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