Documentation
¶
Index ¶
- Constants
- Variables
- func RunDaemon(ctx context.Context, config *Config) error
- func StateDirectory() (string, error)
- type ApplyResult
- type CapacityConfig
- type Config
- type Credential
- type DaemonInfo
- type DefaultsConfig
- type Duration
- type LogsConfig
- 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.3"
Version is the application version.
Variables ¶
var Revision = "HEAD"
Revision is the source revision, set at build time.
Functions ¶
func StateDirectory ¶ added in v0.0.3
StateDirectory returns the persistent application directory used by this process.
Types ¶
type ApplyResult ¶ added in v0.0.2
type ApplyResult struct {
Status *Status
Results []OperationResult
}
ApplyResult includes the applied snapshot and individual reconciliation results.
type CapacityConfig ¶
type CapacityConfig struct {
MaxRunners int `yaml:"maxRunners"`
}
type Config ¶
type Config struct {
Defaults DefaultsConfig `yaml:"defaults"`
Capacity CapacityConfig `yaml:"capacity"`
Targets []Target `yaml:"targets"`
Runner RunnerConfig `yaml:"runner"`
Logs LogsConfig `yaml:"logs"`
Path string `yaml:"-"`
// contains filtered or unexported fields
}
func LoadConfig ¶
type Credential ¶
type Credential struct {
Type string `yaml:"type"`
Hostname string `yaml:"hostname"`
TokenEnv string `yaml:"tokenEnv"`
TokenFile string `yaml:"tokenFile"`
ClientID string `yaml:"clientId"`
PrivateKeyFile string `yaml:"privateKeyFile"`
}
func (*Credential) UnmarshalYAML ¶ added in v0.0.2
func (c *Credential) UnmarshalYAML(unmarshal func(any) error) error
type DaemonInfo ¶ added in v0.0.2
type DaemonInfo struct {
UID int `json:"uid"`
Socket string `json:"socket"`
Status Status `json:"status"`
}
DaemonInfo identifies an accessible daemon and its running snapshot.
func ListDaemons ¶ added in v0.0.2
func ListDaemons(ctx context.Context, config string) ([]DaemonInfo, error)
ListDaemons finds responsive daemons accessible to the management user. A nonempty config path limits discovery to that configuration.
type DefaultsConfig ¶ added in v0.0.2
type DefaultsConfig struct {
Credential *Credential `yaml:"credential"`
}
type LogsConfig ¶ added in v0.0.2
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 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"`
// contains filtered or unexported fields
}
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 |
|---|---|
|
Package appsetup creates a private GitHub App from a Manifest and configures one GitHub.com target without starting or reconfiguring the daemon.
|
Package appsetup creates a private GitHub App from a Manifest and configures one GitHub.com target without starting or reconfiguring the daemon. |
|
ghalet
command
|
|
|
Package credentialstore manages encrypted systemd credentials for ghalet.
|
Package credentialstore manages encrypted systemd credentials for ghalet. |
|
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. |