Documentation
¶
Index ¶
- type BillingMetricsExporter
- type Opts
- type PrometheusObserver
- 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
- type WorkflowMetricsExporter
- type WorkflowObserver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BillingMetricsExporter ¶
func NewBillingMetricsExporter ¶
func NewBillingMetricsExporter(logger log.Logger, opts Opts) *BillingMetricsExporter
func (*BillingMetricsExporter) StartOrgBilling ¶
func (c *BillingMetricsExporter) StartOrgBilling(ctx context.Context) error
func (*BillingMetricsExporter) StartUserBilling ¶
func (c *BillingMetricsExporter) StartUserBilling(ctx context.Context) error
type PrometheusObserver ¶
type PrometheusObserver struct{}
func (*PrometheusObserver) CountWorkflowJobDuration ¶
func (o *PrometheusObserver) CountWorkflowJobDuration(org, repo, branch, status, conclusion, runnerGroup string, seconds float64)
func (*PrometheusObserver) CountWorkflowJobStatus ¶
func (o *PrometheusObserver) CountWorkflowJobStatus(org, repo, branch, status, conclusion, runnerGroup string)
func (*PrometheusObserver) CountWorkflowRunStatus ¶
func (o *PrometheusObserver) CountWorkflowRunStatus(org, repo, branch, status, conclusion, workflowName string)
func (*PrometheusObserver) ObserveWorkflowJobDuration ¶
func (o *PrometheusObserver) ObserveWorkflowJobDuration(org, repo, branch, state, runnerGroup string, seconds float64)
func (*PrometheusObserver) ObserveWorkflowRunDuration ¶
func (o *PrometheusObserver) ObserveWorkflowRunDuration(org, repo, branch, workflowName string, seconds float64)
type WorkflowMetricsExporter ¶
type WorkflowMetricsExporter struct { GHClient *github.Client Logger log.Logger Opts Opts PrometheusObserver WorkflowObserver }
WorkflowMetricsExporter struct to hold some information
func NewWorkflowMetricsExporter ¶
func NewWorkflowMetricsExporter(logger log.Logger, opts Opts) *WorkflowMetricsExporter
func (*WorkflowMetricsExporter) CollectWorkflowJobEvent ¶
func (c *WorkflowMetricsExporter) CollectWorkflowJobEvent(event *github.WorkflowJobEvent)
func (*WorkflowMetricsExporter) CollectWorkflowRunEvent ¶
func (c *WorkflowMetricsExporter) CollectWorkflowRunEvent(event *github.WorkflowRunEvent)
func (*WorkflowMetricsExporter) HandleGHWebHook ¶
func (c *WorkflowMetricsExporter) HandleGHWebHook(w http.ResponseWriter, r *http.Request)
handleGHWebHook responds to POST /gh_event, when receive a event from GitHub.
type WorkflowObserver ¶
type WorkflowObserver interface { ObserveWorkflowJobDuration(org, repo, branch, state, runnerGroup string, seconds float64) CountWorkflowJobStatus(org, repo, branch, status, conclusion, runnerGroup string) CountWorkflowJobDuration(org, repo, branch, status, conclusion, runnerGroup string, seconds float64) ObserveWorkflowRunDuration(org, repo, branch, workflow string, seconds float64) CountWorkflowRunStatus(org, repo, branch, status, conclusion, workflow string) }
Click to show internal directories.
Click to hide internal directories.