internal

package
v0.50.0 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2021 License: BSD-3-Clause Imports: 42 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// WorkerServerPort is name of environment variable set to local worker HTTP server port
	WorkerServerPort = "CDS_EXPORT_PORT"

	// CDS API URL
	CDSApiUrl = "CDS_API_URL"
)

Variables

This section is empty.

Functions

func LogMiddleware

func LogMiddleware(h http.HandlerFunc) http.HandlerFunc

func LoopPath

func LoopPath(w *CurrentWorker, reqs []sdk.Requirement) []string

LoopPath returns the list of available binaries in path

func StartWorker

func StartWorker(ctx context.Context, w *CurrentWorker, bookedJobID int64) (mainError error)

Types

type BuiltInAction

BuiltInAction defines builtin action signature

type CurrentWorker

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

func (*CurrentWorker) BaseDir

func (wk *CurrentWorker) BaseDir() afero.Fs

func (*CurrentWorker) Blur

func (w *CurrentWorker) Blur(i interface{}) error

func (*CurrentWorker) CDNHttpURL

func (wk *CurrentWorker) CDNHttpURL() string

func (*CurrentWorker) Client

func (*CurrentWorker) Environ

func (wk *CurrentWorker) Environ() []string

func (*CurrentWorker) FeatureEnabled

func (wk *CurrentWorker) FeatureEnabled(name sdk.FeatureName) bool

func (*CurrentWorker) GetContext

func (wk *CurrentWorker) GetContext() context.Context

func (*CurrentWorker) GetJobIdentifiers

func (wk *CurrentWorker) GetJobIdentifiers() (int64, int64, int64)

func (*CurrentWorker) GetPlugin

func (wk *CurrentWorker) GetPlugin(pluginType string) *sdk.GRPCPlugin

func (*CurrentWorker) HTTPPort

func (w *CurrentWorker) HTTPPort() int32

func (*CurrentWorker) Init

func (wk *CurrentWorker) Init(cfg *workerruntime.WorkerConfig, workspace afero.Fs) error

func (*CurrentWorker) InstallKey

func (wk *CurrentWorker) InstallKey(key sdk.Variable) (*workerruntime.KeyResponse, error)

func (*CurrentWorker) InstallKeyTo

func (wk *CurrentWorker) InstallKeyTo(key sdk.Variable, destinationPath string) (*workerruntime.KeyResponse, error)

func (*CurrentWorker) Name

func (wk *CurrentWorker) Name() string

func (*CurrentWorker) Parameters

func (wk *CurrentWorker) Parameters() []sdk.Parameter

func (*CurrentWorker) ProcessJob

func (w *CurrentWorker) ProcessJob(jobInfo sdk.WorkflowNodeJobRunData) (res sdk.Result)

func (*CurrentWorker) Register

func (w *CurrentWorker) Register(ctx context.Context) error

Workers need to register to main api so they can run actions

func (*CurrentWorker) RunResultSignature

func (wk *CurrentWorker) RunResultSignature(artifactName string, perm uint32, t sdk.WorkflowRunResultType) (string, error)

func (*CurrentWorker) SendLog

func (wk *CurrentWorker) SendLog(ctx context.Context, level workerruntime.Level, logLine string)

func (*CurrentWorker) SendTerminatedStepLog

func (wk *CurrentWorker) SendTerminatedStepLog(ctx context.Context, level workerruntime.Level, logLine string)

func (*CurrentWorker) Serve

func (w *CurrentWorker) Serve(c context.Context) error

func (*CurrentWorker) SetContext

func (wk *CurrentWorker) SetContext(c context.Context)

func (*CurrentWorker) SetGelfLogger

func (wk *CurrentWorker) SetGelfLogger(h *loghook.Hook, l *logrus.Logger)

func (*CurrentWorker) Take

func (*CurrentWorker) Unregister

func (w *CurrentWorker) Unregister(ctx context.Context) error

func (*CurrentWorker) WorkerCacheSignature

func (wk *CurrentWorker) WorkerCacheSignature(tag string) (string, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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