actionsrunner

package
v0.6.10 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicLogger

type BasicLogger interface {
	Printf(format string, a ...interface{})
}

type ConsoleLogger

type ConsoleLogger struct {
}

func (*ConsoleLogger) Printf

func (*ConsoleLogger) Printf(format string, a ...interface{})

type DefaultWorkerContext

type DefaultWorkerContext struct {
	RunnerMessage       *protocol.AgentJobRequestMessage
	JobLogger           *logger.JobLogger
	JobExecutionContext context.Context
	VssConnection       *protocol.VssConnection
	RunnerLogger        BasicLogger
}

func (*DefaultWorkerContext) FailInitJob

func (wc *DefaultWorkerContext) FailInitJob(title string, message string)

func (*DefaultWorkerContext) FinishJob

func (wc *DefaultWorkerContext) FinishJob(result string, outputs *map[string]protocol.VariableValue)

func (*DefaultWorkerContext) Init

func (wc *DefaultWorkerContext) Init()

func (*DefaultWorkerContext) JobExecCtx

func (wc *DefaultWorkerContext) JobExecCtx() context.Context

func (*DefaultWorkerContext) Logger

func (wc *DefaultWorkerContext) Logger() *logger.JobLogger

func (*DefaultWorkerContext) Message

type JobRun

type JobRun struct {
	RequestID       int64
	JobID           string
	Plan            *protocol.TaskOrchestrationPlanReference
	Name            string
	RegistrationURL string
	RunServiceURL   string
}

type PrefixConsoleLogger

type PrefixConsoleLogger struct {
	Parent BasicLogger
	Prefix string
}

func (*PrefixConsoleLogger) Printf

func (p *PrefixConsoleLogger) Printf(format string, a ...interface{})

type RunRunner

type RunRunner struct {
	Once     bool
	Trace    bool
	Version  string
	Settings *runnerconfiguration.RunnerSettings
}

func (*RunRunner) Run

func (run *RunRunner) Run(runnerenv RunnerEnvironment, listenerctx context.Context, corectx context.Context) error

type RunnerEnvironment

type RunnerEnvironment interface {
	BasicLogger
	ReadJson(fname string, obj interface{}) error
	WriteJson(fname string, obj interface{}) error
	Remove(fname string) error
	ExecWorker(run *RunRunner, wc WorkerContext, jobreq *protocol.AgentJobRequestMessage, src []byte) error
}

type RunnerJobRequestRef

type RunnerJobRequestRef struct {
	Id              string `json:"id"`
	RunnerRequestId string `json:"runner_request_id"`
	RunServiceUrl   string `json:"run_service_url"`
}

type WorkerContext

type WorkerContext interface {
	FinishJob(result string, outputs *map[string]protocol.VariableValue)
	FailInitJob(title string, message string)
	Message() *protocol.AgentJobRequestMessage
	Logger() *logger.JobLogger
	JobExecCtx() context.Context
}

type WorkerRunnerEnvironment

type WorkerRunnerEnvironment struct {
	WorkerArgs []string
}

func (*WorkerRunnerEnvironment) ExecWorker

func (arunner *WorkerRunnerEnvironment) ExecWorker(run *RunRunner, wc WorkerContext, jobreq *protocol.AgentJobRequestMessage, src []byte) error

func (*WorkerRunnerEnvironment) Printf

func (arunner *WorkerRunnerEnvironment) Printf(format string, a ...interface{})

func (*WorkerRunnerEnvironment) ReadJson

func (arunner *WorkerRunnerEnvironment) ReadJson(path string, value interface{}) error

func (*WorkerRunnerEnvironment) Remove

func (arunner *WorkerRunnerEnvironment) Remove(fname string) error

func (*WorkerRunnerEnvironment) WriteJson

func (arunner *WorkerRunnerEnvironment) WriteJson(path string, value interface{}) error

Jump to

Keyboard shortcuts

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