executor

package
v0.0.0-...-40dcc27 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2023 License: Unlicense Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecuteFileContentsOnExecutor

func ExecuteFileContentsOnExecutor(ctx context.Context) error

func ListenForCommands

func ListenForCommands(ctx context.Context, waitGroup *sync.WaitGroup) error

func NomadClientFromContext

func NomadClientFromContext(ctx context.Context) (*nomad.Client, bool)

func ReleaseExecutor

func ReleaseExecutor(ctx context.Context) error

Types

type ExecOutput

type ExecOutput struct {
	Stdout []byte
	Stderr []byte
}

type ExecutorLocator

type ExecutorLocator struct {
	DispatchId   string
	AllocationId string
}

func ReserveExecutor

func ReserveExecutor(ctx context.Context) (*ExecutorLocator, error)

type ExecutorLogger

type ExecutorLogger struct {
	Stdout *io.PipeWriter
	Stderr *io.PipeWriter
	// contains filtered or unexported fields
}

func ExecutorLoggerFromContext

func ExecutorLoggerFromContext(ctx context.Context) (*ExecutorLogger, bool)

func NewExecutorLogger

func NewExecutorLogger(encoder *gob.Encoder) *ExecutorLogger

func (*ExecutorLogger) Close

func (el *ExecutorLogger) Close()

func (*ExecutorLogger) EndWithError

func (el *ExecutorLogger) EndWithError(message []byte, status int)

func (*ExecutorLogger) EndWithOutput

func (el *ExecutorLogger) EndWithOutput(output []byte)

func (*ExecutorLogger) Error

func (el *ExecutorLogger) Error(message string, a ...any)

func (*ExecutorLogger) Info

func (el *ExecutorLogger) Info(message string, a ...any)

type ExecutorRequest

type ExecutorRequest struct {
	Command   string
	Arguments []string

	UniqueJobId string
}

func RequestFromContext

func RequestFromContext(ctx context.Context) (*ExecutorRequest, bool)

type ExecutorResponse

type ExecutorResponse struct {
	Stdout []byte
	Stderr []byte

	Status int
	Done   bool
}

type GitLabExecutorConfig

type GitLabExecutorConfig struct {
	Driver    configs.DriverConfig `json:"driver"`
	BuildsDir string               `json:"builds_dir"`
	CacheDir  string               `json:"cache_dir"`
}

Jump to

Keyboard shortcuts

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