Skip to content

Commit

Permalink
Merge branch 'release/v1.7.0-beta2'
Browse files Browse the repository at this point in the history
  • Loading branch information
moutonjeremy committed Mar 26, 2021
2 parents 5148952 + 7afcd67 commit 086f8bc
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ var (
Debug bool
)

// InitConfiguration => set configuration from env vars or command parameters
// InitConfiguration - set configuration from env vars or command parameters
func InitConfiguration() []cli.Flag {
return []cli.Flag{
&cli.IntFlag{
Expand Down
1 change: 1 addition & 0 deletions pkg/metrics/get_billable_from_github.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ var (
)
)

// getBillableFromGithub - return billable informations for MACOS, WINDOWS and UBUNTU runners.
func getBillableFromGithub() {
for {
for _, repo := range config.Github.Repositories.Value() {
Expand Down
1 change: 1 addition & 0 deletions pkg/metrics/get_runners_from_github.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ var (
)
)

// getRunnersFromGithub - return information about runners and their status for a specific repo
func getRunnersFromGithub() {
for {
for _, repo := range config.Github.Repositories.Value() {
Expand Down
1 change: 1 addition & 0 deletions pkg/metrics/get_runners_organization_from_github.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ var (
)
)

// getRunnersOrganizationFromGithub - return information about runners and their status for an organization
func getRunnersOrganizationFromGithub() {
opt := &github.ListOptions{PerPage: 10}
for {
Expand Down
1 change: 1 addition & 0 deletions pkg/metrics/get_workflow_runs_from_github.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ var (
)
)

// getWorkflowRunsFromGithub - return informations and status about a worflow
func getWorkflowRunsFromGithub() {
for {
for _, repo := range config.Github.Repositories.Value() {
Expand Down
1 change: 1 addition & 0 deletions pkg/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ var (
err error
)

// InitMetrics - register metrics in prometheus lib and start func for monitor
func InitMetrics() {
prometheus.MustRegister(runnersGauge)
prometheus.MustRegister(runnersOrganizationGauge)
Expand Down
1 change: 1 addition & 0 deletions pkg/metrics/workflows_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ var (
workflows map[string]map[int64]github.Workflow
)

// workflowCache - used for limit calls to github api
func workflowCache() {
for {
ww := make(map[string]map[int64]github.Workflow)
Expand Down
1 change: 1 addition & 0 deletions pkg/server/routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ var (
index = fasthttpadaptor.NewFastHTTPHandlerFunc(pprof.Index)
)

// prometheusHandler - fastHTTP handler for prometheus metrics
func prometheusHandler() fasthttp.RequestHandler {
return fasthttpadaptor.NewFastHTTPHandler(promhttp.Handler())
}
Expand Down
1 change: 1 addition & 0 deletions pkg/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"github-actions-exporter/pkg/metrics"
)

// RunServer - run http server for expose metrics
func RunServer(ctx *cli.Context) error {
metrics.InitMetrics()

Expand Down

0 comments on commit 086f8bc

Please sign in to comment.