batch

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2019 License: MIT Imports: 24 Imported by: 0

Documentation

Overview

SPDX-License-Identifier: MIT Copyright (c) 2019 Hadrien Chauvin

SPDX-License-Identifier: MIT Copyright (c) 2019 Hadrien Chauvin

Index

Constants

View Source
const (
	EnvironmentDeployment     = EnvironmentSetupType("deployment")
	EnvironmentInitialization = EnvironmentSetupType("initialization")
)

Variables

This section is empty.

Functions

func RunBatch

func RunBatch(
	ctx context.Context,
	cfg *config.Config,
	batch *batches.Batch,
	options *RunBatchOptions,
	k8sClient *k8s.K8s,
) error

Types

type CommandInfo

type CommandInfo struct {
	BatchID string
	Name    string
	Tries   int
}

type CommandResult

type CommandResult struct {
	CommandInfo
	Err       *string
	Started   time.Time
	Completed time.Time
}

type EnvironmentInfo

type EnvironmentInfo struct {
	BatchID      string
	StackName    string
	PipelinePath string
}

type EnvironmentSetupResult

type EnvironmentSetupResult struct {
	EnvironmentInfo
	SetupType EnvironmentSetupType
	Err       *string
	Started   time.Time
	Completed time.Time
}

type EnvironmentSetupType

type EnvironmentSetupType string

type NoopReporter

type NoopReporter struct{}

func (*NoopReporter) CommandOutput

func (reporter *NoopReporter) CommandOutput(info *CommandInfo) (io.WriteCloser, error)

func (*NoopReporter) CommandResult

func (reporter *NoopReporter) CommandResult(result *CommandResult)

func (*NoopReporter) EnvironmentSetupResult

func (reporter *NoopReporter) EnvironmentSetupResult(result *EnvironmentSetupResult)

func (*NoopReporter) Finalize

func (reporter *NoopReporter) Finalize() error

type Reporter

type Reporter interface {
	EnvironmentSetupResult(result *EnvironmentSetupResult)
	CommandOutput(info *CommandInfo) (io.WriteCloser, error)
	CommandResult(result *CommandResult)
	Finalize() error
}

type RunBatchOptions

type RunBatchOptions struct {
	Parallelism          int
	MaxStacksPerPipeline int
	Bail                 bool
	Reporter             Reporter
	Events               chan<- interface{}
}

Directories

Path Synopsis
SPDX-License-Identifier: MIT Copyright (c) 2019 Hadrien Chauvin
SPDX-License-Identifier: MIT Copyright (c) 2019 Hadrien Chauvin

Jump to

Keyboard shortcuts

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