params

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: Apache-2.0 Imports: 3 Imported by: 13 modules, 24 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	Address string      `json:"address"`
	Type    AddressType `json:"type"`
}

type AddressType

type AddressType string
const (
	PublicAddress  AddressType = "public"
	PrivateAddress AddressType = "private"
)

type BootstrapInstance

type BootstrapInstance struct {
	Name  string                      `json:"name"`
	Tools []RunnerApplicationDownload `json:"tools"`
	// RepoURL is the URL the github runner agent needs to configure itself.
	RepoURL string `json:"repo_url"`
	// CallbackUrl is the URL where the instance can send a post, signaling
	// progress or status.
	CallbackURL string `json:"callback-url"`
	// MetadataURL is the URL where instances can fetch information needed to set themselves up.
	MetadataURL string `json:"metadata-url"`
	// InstanceToken is the token that needs to be set by the instance in the headers
	// in order to send updated back to the garm via CallbackURL.
	InstanceToken string `json:"instance-token"`
	// SSHKeys are the ssh public keys we may want to inject inside the runners, if the
	// provider supports it.
	SSHKeys []string `json:"ssh-keys"`
	// ExtraSpecs is an opaque raw json that gets sent to the provider
	// as part of the bootstrap params for instances. It can contain
	// any kind of data needed by providers. The contents of this field means
	// nothing to garm itself. We don't act on the information in this field at
	// all. We only validate that it's a proper json.
	ExtraSpecs json.RawMessage `json:"extra_specs,omitempty"`

	// GitHubRunnerGroup is the github runner group in which the newly installed runner
	// should be added to. The runner group must be created by someone with access to the
	// enterprise.
	GitHubRunnerGroup string `json:"github-runner-group"`

	// CACertBundle is a CA certificate bundle which will be sent to instances and which
	// will tipically be installed as a system wide trusted root CA. by either cloud-init
	// or whatever mechanism the provider will use to set up the runner.
	CACertBundle []byte `json:"ca-cert-bundle"`

	// OSArch is the target OS CPU architecture of the runner.
	OSArch OSArch `json:"arch"`

	// OSType is the target OS platform of the runner (windows, linux, darwin).
	OSType OSType `json:"os_type"`

	// Flavor is the platform specific abstraction that defines what resources will be allocated
	// to the runner (CPU, RAM, disk space, etc). This field is meaningful to the provider which
	// handles the actual creation.
	Flavor string `json:"flavor"`

	// Image is the platform specific identifier of the operating system template that will be used
	// to spin up a new machine.
	Image string `json:"image"`

	// Labels are a list of github runner labels that will be added to the runner.
	Labels []string `json:"labels"`

	// PoolID is the ID of the garm pool to which this runner belongs.
	PoolID string `json:"pool_id"`

	// UserDataOptions are the options for the user data generation.
	UserDataOptions UserDataOptions `json:"user_data_options"`

	// JitConfigEnabled is a flag that indicates if the runner should be configured to use
	// just-in-time configuration. If set to true, providers must attempt to fetch the JIT configuration
	// from the metadata service instead of the runner registration token. The runner registration token
	// is not available if the runner is configured to use JIT.
	JitConfigEnabled bool `json:"jit_config_enabled"`

	// ProxyConfig is the proxy configuration that gets added to the cloud-init
	// config.
	ProxyConfig ProxyConfig `json:"proxy_config"`
}

type InstanceStatus

type InstanceStatus string
const (
	InstanceRunning            InstanceStatus = "running"
	InstanceStopped            InstanceStatus = "stopped"
	InstanceError              InstanceStatus = "error"
	InstancePendingDelete      InstanceStatus = "pending_delete"
	InstancePendingForceDelete InstanceStatus = "pending_force_delete"
	InstanceDeleting           InstanceStatus = "deleting"
	InstanceDeleted            InstanceStatus = "deleted"
	InstancePendingCreate      InstanceStatus = "pending_create"
	InstanceCreating           InstanceStatus = "creating"
	InstanceStatusUnknown      InstanceStatus = "unknown"
)

type OSArch

type OSArch string
const (
	Amd64   OSArch = "amd64"
	I386    OSArch = "i386"
	Arm64   OSArch = "arm64"
	Arm     OSArch = "arm"
	Ppc64le OSArch = "ppc64le"
	S390x   OSArch = "s390x"
	Riscv64 OSArch = "riscv64"
)

type OSType

type OSType string
const (
	Windows OSType = "windows"
	Linux   OSType = "linux"
	Darwin  OSType = "darwin"
	Unknown OSType = "unknown"
)

type ProviderInstance

type ProviderInstance struct {
	// PeoviderID is the unique ID the provider associated
	// with the compute instance. We use this to identify the
	// instance in the provider.
	ProviderID string `json:"provider_id,omitempty"`

	// Name is the name associated with an instance. Depending on
	// the provider, this may or may not be useful in the context of
	// the provider, but we can use it internally to identify the
	// instance.
	Name string `json:"name,omitempty"`

	// OSType is the operating system type. Supported values are Linux,
	// Windows and Darwin.
	OSType OSType `json:"os_type,omitempty"`

	// OSName is the name of the OS. Eg: ubuntu, centos, etc.
	OSName string `json:"os_name,omitempty"`

	// OSVersion is the version of the operating system.
	OSVersion string `json:"os_version,omitempty"`

	// OSArch is the operating system architecture.
	OSArch OSArch `json:"os_arch,omitempty"`

	// Addresses is a list of IP addresses the provider reports
	// for this instance.
	Addresses []Address `json:"addresses,omitempty"`

	// Status is the status of the instance inside the provider (eg: running, stopped, etc)
	Status InstanceStatus `json:"status,omitempty"`

	// ProviderFault holds any error messages captured from the IaaS provider that is
	// responsible for managing the lifecycle of the runner.
	ProviderFault []byte `json:"provider_fault,omitempty"`
}

type ProxyConfig added in v0.1.10

type ProxyConfig struct {
	HTTPProxy  string `json:"http_proxy"`
	HTTPSProxy string `json:"https_proxy"`
	NoProxy    string `json:"no_proxy"`
}

func (ProxyConfig) GetBootCmd added in v0.1.10

func (p ProxyConfig) GetBootCmd() (string, bool)

func (ProxyConfig) HasProxy added in v0.1.10

func (p ProxyConfig) HasProxy() bool

type RunnerApplicationDownload

type RunnerApplicationDownload struct {
	OS                *string `json:"os,omitempty"`
	Architecture      *string `json:"architecture,omitempty"`
	DownloadURL       *string `json:"download_url,omitempty"`
	Filename          *string `json:"filename,omitempty"`
	TempDownloadToken *string `json:"temp_download_token,omitempty"`
	SHA256Checksum    *string `json:"sha256_checksum,omitempty"`
}

RunnerApplicationDownload represents a binary for the self-hosted runner application that can be downloaded. This is copied from the go-github package. It does not make sense to create a dependency on go-github just for this struct.

func (*RunnerApplicationDownload) GetArchitecture

func (r *RunnerApplicationDownload) GetArchitecture() string

GetArchitecture returns the Architecture field if it's non-nil, zero value otherwise.

func (*RunnerApplicationDownload) GetDownloadURL

func (r *RunnerApplicationDownload) GetDownloadURL() string

GetDownloadURL returns the DownloadURL field if it's non-nil, zero value otherwise.

func (*RunnerApplicationDownload) GetFilename

func (r *RunnerApplicationDownload) GetFilename() string

GetFilename returns the Filename field if it's non-nil, zero value otherwise.

func (*RunnerApplicationDownload) GetOS

func (r *RunnerApplicationDownload) GetOS() string

GetOS returns the OS field if it's non-nil, zero value otherwise.

func (*RunnerApplicationDownload) GetSHA256Checksum

func (r *RunnerApplicationDownload) GetSHA256Checksum() string

GetSHA256Checksum returns the SHA256Checksum field if it's non-nil, zero value otherwise.

func (*RunnerApplicationDownload) GetTempDownloadToken

func (r *RunnerApplicationDownload) GetTempDownloadToken() string

GetTempDownloadToken returns the TempDownloadToken field if it's non-nil, zero value otherwise.

func (*RunnerApplicationDownload) Platform added in v0.1.10

func (r *RunnerApplicationDownload) Platform() string

Platform returns the "os/arch" pair this download is built for, using the names the runner tools list uses (so "linux/x64", not "linux/amd64"). It is the natural key for a set of tools: exactly one download serves any given platform. An absent OS or architecture yields an empty segment rather than an error, matching the other accessors.

type UserDataOptions

type UserDataOptions struct {
	DisableUpdatesOnBoot bool     `json:"disable_updates_on_boot"`
	ExtraPackages        []string `json:"extra_packages"`
	EnableBootDebug      bool     `json:"enable_boot_debug"`
}

Jump to

Keyboard shortcuts

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