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

jobrunner

package
v0.98.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package jobrunner runs one claimed Job using the same executor and reporter as the long-lived Self-hosted runner.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Capabilities added in v0.81.0

func Capabilities() []string

Capabilities lists what this runner build supports. A caller that claims a job itself, such as the CLI's ephemeral run, declares them on its claim so the control plane can refuse a job this build cannot run safely.

Types

type Client

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

func NewClient

func NewClient(cfg Config) (*Client, error)

func (*Client) Run

func (c *Client) Run(ctx context.Context, job Job) (Result, error)

type Config

type Config struct {
	BaseURL   string
	JobToken  string
	RunnerID  string
	BootID    uuid.UUID
	Timeout   time.Duration
	Heartbeat time.Duration
}

type Job

type Job struct {
	JobID           uuid.UUID                   `json:"job_id"`
	ExecutionID     uuid.UUID                   `json:"execution_id"`
	FlowID          uuid.UUID                   `json:"flow_id"`
	LeaseExpiresAt  time.Time                   `json:"lease_expires_at"`
	FlowDefinition  json.RawMessage             `json:"flow_definition"`
	Inputs          map[string]any              `json:"inputs"`
	SecretInputKeys []string                    `json:"secret_input_keys,omitempty"`
	ReferencedFlows flow.ReferencedFlowRegistry `json:"referenced_flows,omitempty"`
	// MaxHTTPCallsPerExecution is the HTTP call limit; zero records without one.
	MaxHTTPCallsPerExecution int `json:"max_http_calls_per_execution,omitempty"`
}

type Result

type Result struct {
	Status       string
	Execution    *spi.FlowExecutionResult
	ErrorMessage *string
}

Jump to

Keyboard shortcuts

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