batch

package
v0.0.0-...-3e18347 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultCancelReason = "Requested by user"
)

Functions

func InitAwsSession

func InitAwsSession() *session.Session

Types

type BatchCli

type BatchCli struct {
	Session *session.Session
}

func (*BatchCli) CancelJob

func (b *BatchCli) CancelJob(jobID string) error

func (*BatchCli) FollowJob

func (b *BatchCli) FollowJob(jobID string) *JobFollower

func (*BatchCli) GetJob

func (b *BatchCli) GetJob(jobID string) (*batch.JobDetail, error)

func (*BatchCli) PrepareBatchSubmitInput

func (b *BatchCli) PrepareBatchSubmitInput(request *SubmitRequest) *batch.SubmitJobInput

func (*BatchCli) SubmitJob

func (b *BatchCli) SubmitJob(request *SubmitRequest) (string, error)

SubmitJob submits a job to batch cli

type JobFollower

type JobFollower struct {
	Status  chan string
	Error   chan error
	Logging chan string
}

type LogFollower

type LogFollower struct {
	Out       chan string
	Error     chan error
	Terminate chan bool
}

func FollowCloudWatchLog

func FollowCloudWatchLog(sess *session.Session, group string, stream string, repeat bool) *LogFollower

type SubmitRequest

type SubmitRequest struct {
	Name            string
	Queue           string
	Definition      string
	Command         []string
	Parameters      map[string]string
	Environment     map[string]string
	Timeout         int
	Retries         int
	ContainerMemory int
	ContainerVcpus  int
}

SubmitRequest simple wrapper of AWS SubmitJobInput

func (*SubmitRequest) SetCommandString

func (s *SubmitRequest) SetCommandString(cmd string)

SetCommandString set batch command string

Jump to

Keyboard shortcuts

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