metrics

package
v1.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 30, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GitRequestTypeLsRemote = "ls-remote"
	GitRequestTypeFetch    = "fetch"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GitRequestType

type GitRequestType string

type MetricsServer

type MetricsServer struct {
	// contains filtered or unexported fields
}

func NewMetricsServer

func NewMetricsServer(gitClientFactory git.ClientFactory) *MetricsServer

NewMetricsServer returns a new prometheus server which collects application metrics

func (*MetricsServer) GetHandler

func (m *MetricsServer) GetHandler() http.Handler

func (*MetricsServer) IncGitRequest

func (m *MetricsServer) IncGitRequest(repo string, requestType GitRequestType)

IncGitRequest increments the git requests counter

func (*MetricsServer) NewClient

func (m *MetricsServer) NewClient(repoURL, path, username, password, sshPrivateKey string, insecureIgnoreHostKey bool) (git.Client, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL