Documentation
¶
Index ¶
- Constants
- Variables
- func RunDaemon(ctx context.Context, config *Config) error
- type CapacityConfig
- type CleanupConfig
- type Config
- type Credential
- type DestroyOptions
- type DestroyPlan
- type DestroyResult
- type Duration
- type OperationError
- type OperationResult
- type Problem
- type ProcessIdentity
- type RunState
- type RunnerConfig
- type ScalingConfig
- type Status
- type Target
- type TargetStatus
Constants ¶
const Version = "0.0.1"
Version is the application version.
Variables ¶
var Revision = "HEAD"
Revision is the source revision, set at build time.
Functions ¶
Types ¶
type CapacityConfig ¶
type CapacityConfig struct {
MaxRunners int `yaml:"maxRunners"`
}
type CleanupConfig ¶
type Config ¶
type Config struct {
Capacity CapacityConfig `yaml:"capacity"`
Targets []Target `yaml:"targets"`
Runner RunnerConfig `yaml:"runner"`
Cleanup CleanupConfig `yaml:"cleanup"`
Path string `yaml:"-"`
}
func LoadConfig ¶
type Credential ¶
type DestroyOptions ¶
DestroyOptions identifies the registration to delete explicitly.
type DestroyPlan ¶
type DestroyPlan struct {
Target string
URL string
RunnerGroup string
ScaleSet string
ScaleSetID int
GroupID int
}
DestroyPlan describes the registration requiring approval before deletion.
type DestroyResult ¶
type DestroyResult struct {
Status *Status
Results []OperationResult
}
DestroyResult includes the drain snapshot when destruction stops before deletion.
func Destroy ¶
func Destroy(ctx context.Context, path string, options DestroyOptions, confirm func(DestroyPlan) error) (DestroyResult, error)
Destroy drains and deletes an explicitly selected registration only after confirm approves its plan. When the daemon is unavailable, it uses locked offline execution.
type OperationError ¶
type OperationError string
OperationError reports a management failure returned with the daemon's results.
func (OperationError) Error ¶
func (e OperationError) Error() string
type OperationResult ¶
type ProcessIdentity ¶
type RunState ¶
type RunState struct {
Schema int `json:"schema"`
RunID string `json:"runId"`
TargetID string `json:"targetId"`
// Retained for existing state files, not used to identify registrations.
ScopeRef string `json:"scopeRef,omitempty"`
ScopeURL string `json:"scopeUrl"`
GroupName string `json:"groupName"`
GroupID int `json:"groupId"`
ScaleSetName string `json:"scaleSetName"`
ScaleSetID int `json:"scaleSetId"`
RunnerName string `json:"runnerName"`
RunnerID int `json:"runnerId,omitempty"`
User string `json:"user"`
UID int `json:"uid"`
Home string `json:"home"`
RunnerDir string `json:"runnerDir"`
Workspace string `json:"workspace"`
Phase string `json:"phase"`
Process ProcessIdentity `json:"process"`
Members []ProcessIdentity `json:"members,omitempty"`
UpdatedAt time.Time `json:"updatedAt"`
StartedAt time.Time `json:"startedAt,omitempty"`
Ready bool `json:"ready"`
Busy bool `json:"busy"`
ProcessDone bool `json:"processDone"`
Error string `json:"error,omitempty"`
}
type RunnerConfig ¶
type RunnerConfig struct {
Version string `yaml:"version"`
User string `yaml:"user"`
StartupTimeout Duration `yaml:"startupTimeout"`
DrainTimeout Duration `yaml:"drainTimeout"`
WorkRoot string `yaml:"workRoot"`
DistributionRoot string `yaml:"distributionRoot"`
CacheRoot string `yaml:"cacheRoot"`
Env map[string]string `yaml:"env"`
}
type ScalingConfig ¶
type Status ¶
type Status struct {
Config string `json:"config"`
Capacity int `json:"capacity"`
Occupied int `json:"occupied"`
Targets []TargetStatus `json:"targets"`
Runs []*RunState `json:"runs"`
Problems []Problem `json:"problems"`
}
type Target ¶
type Target struct {
ID string `yaml:"id"`
URL string `yaml:"scope"`
Credential Credential `yaml:"credential"`
InstallationID int64 `yaml:"installationId"`
RunnerGroup string `yaml:"runnerGroup"`
ScaleSetName string `yaml:"scaleSet"`
Scaling ScalingConfig `yaml:"scaling"`
}
type TargetStatus ¶
type TargetStatus struct {
ID string `json:"id"`
Assigned int `json:"assignedJobs"`
Pending int `json:"pendingAcquisitions"`
Active int `json:"activeRunners"`
Draining bool `json:"draining"`
Forced bool `json:"forced"`
Fault string `json:"fault,omitempty"`
ScaleSetID int `json:"scaleSetId,omitempty"`
}
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
ghalet
command
|
|
|
Package fshelper provides directory validation and atomic file writes for ghalet's managed files.
|
Package fshelper provides directory validation and atomic file writes for ghalet's managed files. |
|
Package logreduct masks registered secrets in log text and slog attributes.
|
Package logreduct masks registered secrets in log text and slog attributes. |
|
Package runnerdist downloads, verifies, caches, and extracts GitHub Actions runner distributions.
|
Package runnerdist downloads, verifies, caches, and extracts GitHub Actions runner distributions. |