Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GHActionExporter ¶
type GHActionExporter struct {
GHClient *github.Client
Logger log.Logger
Opts Opts
JobObserver WorkflowJobObserver
}
GHActionExporter struct to hold some information
func NewGHActionExporter ¶
func NewGHActionExporter(logger log.Logger, opts Opts) *GHActionExporter
func (*GHActionExporter) CollectActionBilling ¶
func (c *GHActionExporter) CollectActionBilling()
CollectActionBilling collect the action billing.
func (*GHActionExporter) CollectWorkflowJobEvent ¶
func (c *GHActionExporter) CollectWorkflowJobEvent(event *github.WorkflowJobEvent)
func (*GHActionExporter) CollectWorkflowRun ¶
func (c *GHActionExporter) CollectWorkflowRun(checkRunEvent *github.CheckRunEvent)
CollectWorkflowRun collect the workflow execution run metric
func (*GHActionExporter) HandleGHWebHook ¶
func (c *GHActionExporter) HandleGHWebHook(w http.ResponseWriter, r *http.Request)
handleGHWebHook responds to POST /gh_event, when receive a event from GitHub.
type JobObserver ¶
type JobObserver struct{}
func (*JobObserver) ObserveWorkflowJobDuration ¶
func (o *JobObserver) ObserveWorkflowJobDuration(org, repo, state, runnerGroup string, seconds float64)
type WorkflowJobObserver ¶
Click to show internal directories.
Click to hide internal directories.