Help us shape the future of Go! Take the 2026 Go Developer Survey

internal

package
v0.57.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2026 License: BSD-3-Clause Imports: 45 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrColor = "\033[1;31m"
	NoColor  = "\033[0m"
)
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"
	CDSCDNUrl = "CDS_CDN_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)

func V2StartWorker added in v0.53.0

func V2StartWorker(ctx context.Context, w *CurrentWorker, runJobID string, region string) (mainError error)

Types

type ActionPostJob added in v0.55.0

type ActionPostJob struct {
	ContinueOnError bool
	PluginName      string
	Inputs          map[string]interface{}
	StepName        string
}

type BuiltInAction

BuiltInAction defines builtin action signature

type CurrentJobV2 added in v0.53.1

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

type CurrentWorker

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

func (*CurrentWorker) AddStepOutput added in v0.53.1

func (wk *CurrentWorker) AddStepOutput(_ context.Context, outputName string, outputValue string)

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) ClientV2 added in v0.53.0

func (wk *CurrentWorker) ClientV2() cdsclient.V2WorkerInterface

func (*CurrentWorker) Environ

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

func (*CurrentWorker) FeatureEnabled

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

func (*CurrentWorker) GetActionPlugin added in v0.53.0

func (wk *CurrentWorker) GetActionPlugin(pluginName string) *sdk.GRPCPlugin

func (*CurrentWorker) GetContext

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

func (*CurrentWorker) GetCurrentStepsStatus added in v0.55.0

func (wk *CurrentWorker) GetCurrentStepsStatus() sdk.JobStepsStatus

func (*CurrentWorker) GetEnvVariable added in v0.53.1

func (w *CurrentWorker) GetEnvVariable(ctx context.Context, contexts sdk.WorkflowRunJobsContext) (map[string]string, error)

func (*CurrentWorker) GetIntegrationPlugin added in v0.53.0

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

func (*CurrentWorker) GetJobIdentifiers

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

func (*CurrentWorker) GetSubStepName added in v0.55.0

func (wk *CurrentWorker) GetSubStepName() string

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) PluginGet added in v0.53.0

func (wk *CurrentWorker) PluginGet(pluginName string) (*sdk.GRPCPlugin, error)

func (*CurrentWorker) PluginGetBinary added in v0.53.0

func (wk *CurrentWorker) PluginGetBinary(name, os, arch string, w io.Writer) error

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) SetActionPlugin added in v0.53.0

func (wk *CurrentWorker) SetActionPlugin(p *sdk.GRPCPlugin)

func (*CurrentWorker) SetContextForTestJobV2 added in v0.53.1

func (wk *CurrentWorker) SetContextForTestJobV2(t *testing.T, c context.Context)

used into unit tests only

func (*CurrentWorker) SetCurrentStepsStatus added in v0.55.0

func (wk *CurrentWorker) SetCurrentStepsStatus(stepStatus sdk.JobStepsStatus)

func (*CurrentWorker) SetGelfLogger

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

func (*CurrentWorker) SetSecrets added in v0.52.0

func (wk *CurrentWorker) SetSecrets(secrets []sdk.Variable) error

func (*CurrentWorker) SetSubStepName added in v0.55.0

func (wk *CurrentWorker) SetSubStepName(name string)

func (*CurrentWorker) Take

func (*CurrentWorker) Unregister

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

func (*CurrentWorker) V2AddRunResult added in v0.53.1

func (wk *CurrentWorker) V2GetCacheLink(ctx context.Context, cacheKey string) (*sdk.CDNItemLinks, error)

func (*CurrentWorker) V2GetCacheSignature added in v0.55.0

func (wk *CurrentWorker) V2GetCacheSignature(ctx context.Context, cacheKey string) (*workerruntime.CDNSignature, error)

func (*CurrentWorker) V2GetJobContext added in v0.53.1

func (wk *CurrentWorker) V2GetJobContext(ctx context.Context) *sdk.WorkflowRunJobsContext

func (*CurrentWorker) V2GetJobRun added in v0.53.1

func (wk *CurrentWorker) V2GetJobRun(ctx context.Context) *sdk.V2WorkflowRunJob

func (*CurrentWorker) V2GetProjectKey added in v0.55.0

func (wk *CurrentWorker) V2GetProjectKey(ctx context.Context, keyName string, clear bool) (*sdk.ProjectKey, error)

func (*CurrentWorker) V2GetRunResult added in v0.53.1

func (*CurrentWorker) V2ProcessJob added in v0.53.0

func (w *CurrentWorker) V2ProcessJob() (res sdk.V2WorkflowRunJobResult)

func (*CurrentWorker) V2Register added in v0.53.0

func (w *CurrentWorker) V2Register(ctx context.Context, runJobID, region string) error

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

func (*CurrentWorker) V2RunResultsSynchronize added in v0.55.0

func (wk *CurrentWorker) V2RunResultsSynchronize(ctx context.Context) error

func (*CurrentWorker) V2Take added in v0.53.0

func (w *CurrentWorker) V2Take(ctx context.Context, region, jobRunID string) error

func (*CurrentWorker) V2Unregister added in v0.53.0

func (w *CurrentWorker) V2Unregister(ctx context.Context, region, runJobID string) error

func (*CurrentWorker) V2UpdateRunResult added in v0.53.1

func (*CurrentWorker) WorkerCacheSignature

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

func (*CurrentWorker) WorkerCacheSignatureV2 added in v0.55.0

func (wk *CurrentWorker) WorkerCacheSignatureV2(cacheKey string) (*workerruntime.CDNSignature, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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