Versions in this module Expand all Collapse all v0 v0.6.2 Jan 25, 2024 v0.1.2 Jan 25, 2024 Changes in this version + type BillingMetricsExporter struct + GHClient *github.Client + Logger log.Logger + Opts Opts + func NewBillingMetricsExporter(logger log.Logger, opts Opts) *BillingMetricsExporter + func (c *BillingMetricsExporter) StartOrgBilling(ctx context.Context) error + func (c *BillingMetricsExporter) StartUserBilling(ctx context.Context) error + type Opts struct + BillingAPIPollSeconds int + GitHubAPIToken string + GitHubOrg string + GitHubToken string + GitHubUser string + ListenAddressIngress string + ListenAddressMetrics string + MetricsPath string + WebhookPath string + type PrometheusObserver struct + func (o *PrometheusObserver) CountWorkflowJobDuration(org, repo, branch, status, conclusion, runnerGroup string, seconds float64) + func (o *PrometheusObserver) CountWorkflowJobStatus(org, repo, branch, status, conclusion, runnerGroup string) + func (o *PrometheusObserver) CountWorkflowRunStatus(org, repo, branch, status, conclusion, workflowName string) + func (o *PrometheusObserver) ObserveWorkflowJobDuration(org, repo, branch, state, runnerGroup string, seconds float64) + func (o *PrometheusObserver) ObserveWorkflowRunDuration(org, repo, branch, workflowName string, seconds float64) + type Server struct + func NewServer(logger log.Logger, opts Opts) *Server + func (s *Server) Serve(_ context.Context) error + func (s *Server) Shutdown(ctx context.Context) error + type WorkflowMetricsExporter struct + GHClient *github.Client + Logger log.Logger + Opts Opts + PrometheusObserver WorkflowObserver + func NewWorkflowMetricsExporter(logger log.Logger, opts Opts) *WorkflowMetricsExporter + func (c *WorkflowMetricsExporter) CollectWorkflowJobEvent(event *github.WorkflowJobEvent) + func (c *WorkflowMetricsExporter) CollectWorkflowRunEvent(event *github.WorkflowRunEvent) + func (c *WorkflowMetricsExporter) HandleGHWebHook(w http.ResponseWriter, r *http.Request) + type WorkflowObserver interface + CountWorkflowJobDuration func(org, repo, branch, status, conclusion, runnerGroup string, seconds float64) + CountWorkflowJobStatus func(org, repo, branch, status, conclusion, runnerGroup string) + CountWorkflowRunStatus func(org, repo, branch, status, conclusion, workflow string) + ObserveWorkflowJobDuration func(org, repo, branch, state, runnerGroup string, seconds float64) + ObserveWorkflowRunDuration func(org, repo, branch, workflow string, seconds float64)