Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
Start(ctx context.Context) error
Stop() error
// Connection status.
IsConnected() bool
ConnectionError() string
// Runners.
ListOrgRunners(ctx context.Context, org string) ([]*Runner, error)
ListRepoRunners(ctx context.Context, owner, repo string) ([]*Runner, error)
// Workflows.
TriggerWorkflowDispatch(
ctx context.Context,
owner, repo, workflowID, ref string,
inputs map[string]string,
) error
GetWorkflowRun(ctx context.Context, owner, repo string, runID int64) (*WorkflowRun, error)
ListWorkflowRuns(ctx context.Context, owner, repo, workflowID string, opts ListWorkflowRunsOpts) ([]*WorkflowRun, error)
ListWorkflowRunJobs(ctx context.Context, owner, repo string, runID int64) ([]*WorkflowJob, error)
CancelWorkflowRun(ctx context.Context, owner, repo string, runID int64) error
// Rate limiting.
RateLimitRemaining() int
RateLimitReset() time.Time
}
Client defines the interface for GitHub API operations.
type ListWorkflowRunsOpts ¶
type ListWorkflowRunsOpts struct {
Branch string
Event string
Status string
CreatedAt *time.Time
PerPage int
}
ListWorkflowRunsOpts contains options for listing workflow runs.
type Metrics ¶
type Metrics interface {
SetGitHubRateLimit(remaining float64)
}
Metrics interface for rate limit tracking.
type Poller ¶
type Poller interface {
Start(ctx context.Context) error
Stop() error
ForceRefresh(ctx context.Context) error
SetRunnerChangeCallback(cb RunnerChangeCallback)
}
Poller periodically fetches runner status from GitHub.
type Runner ¶
type Runner struct {
ID int64
Name string
OS string
Status string // online, offline
Busy bool
Labels []string
}
Runner represents a GitHub Actions runner.
type RunnerChangeCallback ¶
RunnerChangeCallback is called when runner status changes.
Click to show internal directories.
Click to hide internal directories.