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