agent

package
v0.0.0-...-6a3170c Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2025 License: GPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	None abortedReason = iota
	TimeoutAbortReason
	HeartbeatAbortReason
)

Variables

View Source
var StopError = util.StringError("agent is closed")

Functions

This section is empty.

Types

type Agent

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

func NewAgent

func NewAgent(engine engine.Engine, client api.ServerClient, label string) *Agent

func (*Agent) GracefulShutdown

func (a *Agent) GracefulShutdown()

GracefulShutdown stops to accept new jobs and await all accepted jobs to be completed and to exit.

func (*Agent) Run

func (a *Agent) Run(ctx context.Context, concurrency int, fetchInterval time.Duration) error

type Execution

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

func NewExecution

func NewExecution(engine engine.Engine, job *api.Job, client api.ServerClient) *Execution

func (*Execution) CreateLogWriter

func (e *Execution) CreateLogWriter(ctx context.Context, logName string) io.WriteCloser

func (*Execution) Execute

func (e *Execution) Execute(ctx context.Context) error

Execute executes the job.

func (*Execution) GetDefaultLogWriter

func (e *Execution) GetDefaultLogWriter(ctx context.Context) io.WriteCloser

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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