local

package
v0.25.2 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package local provides the ability for Vela to integrate with the local system.

Usage:

import "github.com/go-vela/worker/executor/local"

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Equal added in v0.14.0

func Equal(a, b *client) bool

equal returns true if the other client is the equivalent.

func New

func New(opts ...Opt) (*client, error)

New returns an Executor implementation that integrates with the local system.

Types

type MockedClient added in v0.15.0

type MockedClient interface {
	MockStdout() *os.File
}

MockedClient is for internal use to facilitate testing the local executor.

type Opt

type Opt func(*client) error

Opt represents a configuration option to initialize the executor client for Local.

func WithBuild

func WithBuild(b *api.Build) Opt

WithBuild sets the API build in the executor client for Local.

func WithHostname

func WithHostname(hostname string) Opt

WithHostname sets the hostname in the executor client for Local.

func WithMockStdout added in v0.15.0

func WithMockStdout(mock bool) Opt

WithMockStdout adds a mock stdout writer to the client if mock is true. If mock is true, then you must use a goroutine to read from MockStdout as quickly as possible, or writing to stdout will hang.

func WithPipeline

func WithPipeline(p *pipeline.Build) Opt

WithPipeline sets the pipeline build in the executor client for Local.

func WithRuntime

func WithRuntime(r runtime.Engine) Opt

WithRuntime sets the runtime engine in the executor client for Local.

func WithVelaClient

func WithVelaClient(cli *vela.Client) Opt

WithVelaClient sets the Vela client in the executor client for Local.

func WithVersion

func WithVersion(version string) Opt

WithVersion sets the version in the executor client for Local.

Jump to

Keyboard shortcuts

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