runner

package
v0.24.2 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2024 License: MPL-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package runner package

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClaimJobInput added in v0.8.0

type ClaimJobInput struct {
	RunnerPath string
}

ClaimJobInput is the input for claiming the next available job

type ClaimJobResponse added in v0.8.0

type ClaimJobResponse struct {
	JobID string
	Token string
}

ClaimJobResponse is the response when claiming a job

type Client added in v0.8.0

type Client interface {
	CreateRunnerSession(ctx context.Context, input *CreateRunnerSessionInput) (string, error)
	SendRunnerSessionHeartbeat(ctx context.Context, sessionID string) error
	ClaimJob(ctx context.Context, input *ClaimJobInput) (*ClaimJobResponse, error)
	CreateRunnerSessionError(ctx context.Context, sessionID string, err error) error
}

Client interface for claiming a job

func NewInternalClient added in v0.17.0

func NewInternalClient(runnerService runner.Service, jobService job.Service) Client

NewInternalClient creates a new internal client

type CreateRunnerSessionInput added in v0.17.0

type CreateRunnerSessionInput struct {
	RunnerPath string
}

CreateRunnerSessionInput is the input for creating a runner session

type JobDispatcherSettings added in v0.8.0

type JobDispatcherSettings struct {
	PluginData           map[string]string
	DispatcherType       string
	ServiceDiscoveryHost string
}

JobDispatcherSettings defines the job dispatcher that'll be used for this runner

type Runner

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

Runner will claim the next available job and dispatch it using the configured job dispatcher

func NewRunner

func NewRunner(
	ctx context.Context,
	runnerPath string,
	logger logger.Logger,
	client Client,
	jobDispatcherSettings *JobDispatcherSettings,
) (*Runner, error)

NewRunner creates a new Runner In Tharsis, this takes a runner path, not a runner ID.

func (*Runner) Start

func (r *Runner) Start(ctx context.Context)

Start will start the runner so it can begin picking up jobs

Directories

Path Synopsis
Package jobdispatcher package
Package jobdispatcher package
docker
Package docker package
Package docker package
ecs
Package ecs package
Package ecs package
kubernetes
Package kubernetes package
Package kubernetes package
kubernetes/configurer
Package configurer package
Package configurer package
kubernetes/configurer/eks
Package eks package
Package eks package
local
Package local package
Package local package

Jump to

Keyboard shortcuts

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