runnerinventory

package
v0.30.0 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package runnerinventory models the execution capacity exposed by the single-process git-ci service and performs provider-correct label matching.

Index

Constants

View Source
const (
	ProviderGitHub = "github"
	ProviderGitLab = "gitlab"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Labels          []string
	Tags            []string
	Group           string
	Hostname        string
	OS              string
	Architecture    string
	DockerAvailable *bool
}

type Inventory

type Inventory struct {
	Runners []Runner `json:"items"`
}

func Local

func Local(config Config) Inventory

func (Inventory) Match

func (inventory Inventory) Match(requirement Requirement) Match

func (Inventory) Snapshot

func (inventory Inventory) Snapshot() Inventory

type Match

type Match struct {
	Evaluated bool     `json:"evaluated"`
	Available bool     `json:"available"`
	RunnerID  string   `json:"runnerId,omitempty"`
	Runner    string   `json:"runner,omitempty"`
	Required  []string `json:"required,omitempty"`
	Missing   []string `json:"missing,omitempty"`
	Group     string   `json:"group,omitempty"`
	Reason    string   `json:"reason"`
}

type Requirement

type Requirement struct {
	Provider       string
	Labels         []string
	Group          string
	RequiresDocker bool
}

type Runner

type Runner struct {
	ID              string   `json:"id"`
	Name            string   `json:"name"`
	Status          string   `json:"status"`
	Mode            string   `json:"mode"`
	OS              string   `json:"os"`
	Architecture    string   `json:"architecture"`
	Group           string   `json:"group"`
	Labels          []string `json:"labels"`
	Tags            []string `json:"tags"`
	DockerAvailable bool     `json:"dockerAvailable"`
	RunUntagged     bool     `json:"runUntagged"`
	MaxParallel     int      `json:"maxParallel"`
}

Jump to

Keyboard shortcuts

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