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

runnerclient

package
v0.2.48 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrControlPlane = errors.New("runner control plane unavailable or rejected request")
View Source
var ErrProviderUnavailable = errors.New("Git provider temporarily unavailable")
View Source
var ErrSourceMoved = errors.New("native source or target moved")
View Source
var ErrTransientControlPlane = errors.New("runner control plane temporarily unavailable")
View Source
var ErrUnauthorized = errors.New("runner credential rejected")

Functions

func Draining added in v0.2.27

func Draining(stop context.Context, timeout time.Duration) (context.Context, context.CancelFunc)

func ValidateRuntimeConfig

func ValidateRuntimeConfig(cfg sandbox.RuntimeConfig) error

Types

type Client

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

func New

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

func (*Client) Broker

func (c *Client) Broker(ctx context.Context, j Job, name, connection string, input any, result any) error

func (*Client) BuiltinOrgs

func (c *Client) BuiltinOrgs(ctx context.Context, secret string) ([]string, error)

func (*Client) Claim

func (c *Client) Claim(ctx context.Context) (Job, error)

func (*Client) Complete

func (c *Client) Complete(ctx context.Context, j Job, result workflow.Completion) error

func (*Client) CustomAuthorize

func (c *Client) CustomAuthorize(ctx context.Context, j Job) (customcmd.Authorized, error)

func (*Client) CustomReport

func (c *Client) CustomReport(ctx context.Context, j Job, in customcmd.ReportInput) (customcmd.Authorized, error)

func (*Client) Enroll

func (c *Client) Enroll(ctx context.Context, token string) error

func (*Client) EnrollBuiltin

func (c *Client) EnrollBuiltin(ctx context.Context, secret, org string) error

func (*Client) GoString

func (*Client) GoString() string

func (*Client) Heartbeat

func (c *Client) Heartbeat(ctx context.Context, j Job) (runner.Heartbeat, error)

func (*Client) Load

func (c *Client) Load() error

func (*Client) ModelTurn

func (c *Client) ModelTurn(ctx context.Context, j Job, in model.Turn) (model.TurnResult, error)

func (*Client) Progress

func (c *Client) Progress(ctx context.Context, j Job, state domain.TaskState) error

func (*Client) RepairCheckpoint

func (c *Client) RepairCheckpoint(ctx context.Context, j Job, in repair.Checkpoint) error

func (*Client) RepairContext

func (c *Client) RepairContext(ctx context.Context, j Job) (repair.ExecutionContext, error)

func (*Client) RepairLogs

func (c *Client) RepairLogs(ctx context.Context, j Job, entries []repair.LogEntry) error

func (*Client) RepairNativeChecks

func (c *Client) RepairNativeChecks(ctx context.Context, j Job, in repair.Publication) error

func (*Client) RepairPublish

func (c *Client) RepairPublish(ctx context.Context, j Job, in repair.Publication) (repair.Run, error)

func (*Client) RepairReport

func (c *Client) RepairReport(ctx context.Context, j Job, in repair.Report) (repair.Run, error)

func (*Client) RepairRun

func (c *Client) RepairRun(ctx context.Context, j Job) (repair.Run, error)

func (*Client) RepairSnapshot

func (c *Client) RepairSnapshot(ctx context.Context, j Job, sha string) (sandbox.Snapshot, error)

func (*Client) RepairStage

func (c *Client) RepairStage(ctx context.Context, j Job) (repair.Run, error)

func (*Client) Rotate

func (c *Client) Rotate(ctx context.Context) error

func (*Client) Run

func (c *Client) Run(ctx context.Context, process Processor) error

func (*Client) Step

func (c *Client) Step(ctx context.Context, process Processor) (bool, error)

func (*Client) String

func (*Client) String() string

func (*Client) Supervisor

func (c *Client) Supervisor() (runner.Runner, string)

func (*Client) Upload

func (c *Client) Upload(ctx context.Context, j Job, name, media string, data []byte) (artifact.Metadata, error)

type Config

type Config struct {
	Endpoint       string        `json:"endpoint"`
	Development    bool          `json:"development"`
	Name           string        `json:"name"`
	Slots          int           `json:"slots"`
	Internal       bool          `json:"internal"`
	CredentialFile string        `json:"credential_file"`
	DrainTimeout   time.Duration `json:"drain_timeout"`
	Client         *http.Client  `json:"-"`
}

type Job

type Job struct {
	Token     string         `json:"token"`
	ExpiresAt time.Time      `json:"expires_at"`
	Lease     workflow.Lease `json:"lease"`
	Task      workflow.Task  `json:"task"`
}

func (Job) GoString

func (Job) GoString() string

func (Job) String

func (Job) String() string

type Processor

type Processor func(context.Context, *Client, Job) (workflow.Completion, error)

func RepairProcessor

func RepairProcessor(config sandbox.RuntimeConfig) Processor

func RepairProcessorWithCloser

func RepairProcessorWithCloser(config sandbox.RuntimeConfig) (Processor, func() error)

Jump to

Keyboard shortcuts

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