Documentation ¶
Index ¶
- Constants
- func WrapGitClient(repo string, metricsServer *MetricsServer, client git.Client) git.Client
- type GitRequestType
- type MetricsServer
- func (m *MetricsServer) DecPendingRepoRequest(repo string)
- func (m *MetricsServer) GetHandler() http.Handler
- func (m *MetricsServer) IncGitRequest(repo string, requestType GitRequestType)
- func (m *MetricsServer) IncPendingRepoRequest(repo string)
- func (m *MetricsServer) IncRedisRequest(failed bool)
- func (m *MetricsServer) ObserveRedisRequestDuration(duration time.Duration)
Constants ¶
View Source
const ( GitRequestTypeLsRemote = "ls-remote" GitRequestTypeFetch = "fetch" )
Variables ¶
This section is empty.
Functions ¶
func WrapGitClient ¶ added in v1.2.4
Types ¶
type GitRequestType ¶
type GitRequestType string
type MetricsServer ¶
type MetricsServer struct {
// contains filtered or unexported fields
}
func NewMetricsServer ¶
func NewMetricsServer() *MetricsServer
NewMetricsServer returns a new prometheus server which collects application metrics
func (*MetricsServer) DecPendingRepoRequest ¶ added in v1.3.0
func (m *MetricsServer) DecPendingRepoRequest(repo string)
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) IncPendingRepoRequest ¶ added in v1.3.0
func (m *MetricsServer) IncPendingRepoRequest(repo string)
func (*MetricsServer) IncRedisRequest ¶ added in v1.5.5
func (m *MetricsServer) IncRedisRequest(failed bool)
func (*MetricsServer) ObserveRedisRequestDuration ¶ added in v1.5.5
func (m *MetricsServer) ObserveRedisRequestDuration(duration time.Duration)
Click to show internal directories.
Click to hide internal directories.