{"modulePath":"github.com/ethpandaops/dispatchoor","version":"v0.1.4","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package github\n\n## Types\n\n```go\ntype Client interface {\n\tStart(ctx context.Context) error\n\tStop() error\n\n\t// Connection status.\n\tIsConnected() bool\n\tConnectionError() string\n\n\t// Runners.\n\tListOrgRunners(ctx context.Context, org string) ([]*Runner, error)\n\tListRepoRunners(ctx context.Context, owner, repo string) ([]*Runner, error)\n\n\t// Workflows.\n\tTriggerWorkflowDispatch(\n\t\tctx context.Context,\n\t\towner, repo, workflowID, ref string,\n\t\tinputs map[string]string,\n\t) error\n\tGetWorkflowRun(ctx context.Context, owner, repo string, runID int64) (*WorkflowRun, error)\n\tListWorkflowRuns(ctx context.Context, owner, repo, workflowID string, opts ListWorkflowRunsOpts) ([]*WorkflowRun, error)\n\tListWorkflowRunJobs(ctx context.Context, owner, repo string, runID int64) ([]*WorkflowJob, error)\n\tCancelWorkflowRun(ctx context.Context, owner, repo string, runID int64) error\n\n\t// Rate limiting.\n\tRateLimitRemaining() int\n\tRateLimitReset() time.Time\n}\n```\nClient defines the interface for GitHub API operations.\n\n```go\nfunc NewClient(log logrus.FieldLogger, token string) Client\n```\nNewClient creates a new GitHub client.\n\n```go\ntype ListWorkflowRunsOpts struct {\n\tBranch    string\n\tEvent     string\n\tStatus    string\n\tCreatedAt *time.Time\n\tPerPage   int\n}\n```\nListWorkflowRunsOpts contains options for listing workflow runs.\n\n```go\ntype Metrics interface {\n\tSetGitHubRateLimit(remaining float64)\n}\n```\nMetrics interface for rate limit tracking.\n\n```go\ntype Poller interface {\n\tStart(ctx context.Context) error\n\tStop() error\n\tForceRefresh(ctx context.Context) error\n\tSetRunnerChangeCallback(cb RunnerChangeCallback)\n}\n```\nPoller periodically fetches runner status from GitHub.\n\n```go\nfunc NewPoller(\n\tlog logrus.FieldLogger,\n\tcfg *config.Config,\n\tclient Client,\n\tst store.Store,\n\tm Metrics,\n) Poller\n```\nNewPoller creates a new runner poller.\n\n```go\ntype Runner struct {\n\tID     int64\n\tName   string\n\tOS     string\n\tStatus string // online, offline\n\tBusy   bool\n\tLabels []string\n}\n```\nRunner represents a GitHub Actions runner.\n\n```go\ntype RunnerChangeCallback func(runner *store.Runner)\n```\nRunnerChangeCallback is called when runner status changes.\n\n```go\ntype WorkflowJob struct {\n\tID         int64\n\tName       string\n\tStatus     string // queued, in_progress, completed\n\tConclusion string // success, failure, cancelled, etc.\n\tRunnerID   int64\n\tRunnerName string\n\tStartedAt  time.Time\n}\n```\nWorkflowJob represents a job within a GitHub Actions workflow run.\n\n```go\ntype WorkflowRun struct {\n\tID         int64\n\tName       string\n\tStatus     string // queued, in_progress, completed\n\tConclusion string // success, failure, cancelled, etc.\n\tHTMLURL    string\n\tCreatedAt  time.Time\n\tUpdatedAt  time.Time\n}\n```\nWorkflowRun represents a GitHub Actions workflow run.\n\n","path":"github.com/ethpandaops/dispatchoor/pkg/github","name":"github","synopsis":"","isRedistributable":true}
