libvirtplugin

package
v0.1.60 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2026 License: Unlicense Imports: 26 Imported by: 0

Documentation

Overview

Package libvirtplugin implements a libvirt-backed GitLab Runner Fleeting plugin.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InstanceGroup

type InstanceGroup struct {
	// This provider is implemented for a dedicated GitLab Runner libvirt/QEMU
	// server. It assumes no other service creates or runs QEMU guests on the
	// same host while this plugin owns the runner VM lifecycle.
	URI                string `json:"uri"`
	PoolName           string `json:"pool_name"`
	BaseVolumeName     string `json:"base_volume_name,omitempty"`
	BaseVolumePath     string `json:"base_volume_path,omitempty"`
	NetworkName        string `json:"network_name,omitempty"`
	StateDir           string `json:"state_dir,omitempty"`
	CACertificatesPath string `json:"ca_certificates_path,omitempty"`
	MaxSize            int    `json:"max_size"`
	VCPUCount          uint   `json:"vcpu_count,omitempty"`
	MemoryMiB          uint   `json:"memory_mib,omitempty"`
	DiskSizeGiB        uint   `json:"disk_size_gib,omitempty"`
	DomainType         string `json:"domain_type,omitempty"`
	MachineType        string `json:"machine_type,omitempty"`
	DiskBus            string `json:"disk_bus,omitempty"`
	NetworkModel       string `json:"network_model,omitempty"`
	AddressSource      string `json:"address_source,omitempty"`
	// contains filtered or unexported fields
}

InstanceGroup implements the Fleeting provider interface for libvirt-backed VMs.

func (*InstanceGroup) ConnectInfo

func (g *InstanceGroup) ConnectInfo(ctx context.Context, id string) (provider.ConnectInfo, error)

ConnectInfo waits for the managed instance address and returns connector details.

func (*InstanceGroup) Decrease

func (g *InstanceGroup) Decrease(ctx context.Context, ids []string) ([]string, error)

Decrease deletes the requested managed libvirt instances.

func (*InstanceGroup) Heartbeat

func (g *InstanceGroup) Heartbeat(ctx context.Context, id string) error

Heartbeat checks whether a managed instance is running and reachable.

func (*InstanceGroup) Increase

func (g *InstanceGroup) Increase(ctx context.Context, delta int) (int, error)

Increase creates up to delta new libvirt instances.

func (*InstanceGroup) Init

Init prepares the provider and reports provider metadata to Fleeting.

func (*InstanceGroup) Resume

func (g *InstanceGroup) Resume(ctx context.Context, _ []string) ([]string, error)

Resume returns ErrSuspendResumeNotSupported because resumption is not supported.

func (*InstanceGroup) Shutdown

func (g *InstanceGroup) Shutdown(ctx context.Context) error

Shutdown deletes all managed libvirt instances for this boot generation.

func (*InstanceGroup) Suspend

func (g *InstanceGroup) Suspend(ctx context.Context, _ []string) ([]string, error)

Suspend returns ErrSuspendResumeNotSupported because suspension is not supported.

func (*InstanceGroup) Update

func (g *InstanceGroup) Update(ctx context.Context, update func(string, provider.State)) error

Update reports the current state of managed libvirt instances.

Jump to

Keyboard shortcuts

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