Documentation ¶
Index ¶
- Constants
- func NewGitClientEventHandlers(metricsServer *MetricsServer) git.EventHandlers
- type GitRequestType
- type MetricsServer
- func (m *MetricsServer) DecPendingRepoRequest(repo string)
- func (m *MetricsServer) GetHandler() http.Handler
- func (m *MetricsServer) IncGitFetchFail(repo string, revision string)
- func (m *MetricsServer) IncGitLsRemoteFail(repo string, revision string)
- func (m *MetricsServer) IncGitRequest(repo string, requestType GitRequestType)
- func (m *MetricsServer) IncPendingRepoRequest(repo string)
- func (m *MetricsServer) IncRedisRequest(failed bool)
- func (m *MetricsServer) ObserveGitRequestDuration(repo string, requestType GitRequestType, duration time.Duration)
- func (m *MetricsServer) ObserveRedisRequestDuration(duration time.Duration)
Constants ¶
View Source
const ( GitRequestTypeLsRemote = "ls-remote" GitRequestTypeFetch = "fetch" )
Variables ¶
This section is empty.
Functions ¶
func NewGitClientEventHandlers ¶ added in v2.1.0
func NewGitClientEventHandlers(metricsServer *MetricsServer) git.EventHandlers
NewGitClientEventHandlers creates event handlers that update Git related metrics
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 ¶
func (m *MetricsServer) DecPendingRepoRequest(repo string)
func (*MetricsServer) GetHandler ¶
func (m *MetricsServer) GetHandler() http.Handler
func (*MetricsServer) IncGitFetchFail ¶ added in v2.11.0
func (m *MetricsServer) IncGitFetchFail(repo string, revision string)
func (*MetricsServer) IncGitLsRemoteFail ¶ added in v2.12.0
func (m *MetricsServer) IncGitLsRemoteFail(repo string, revision string)
func (*MetricsServer) IncGitRequest ¶
func (m *MetricsServer) IncGitRequest(repo string, requestType GitRequestType)
IncGitRequest increments the git requests counter
func (*MetricsServer) IncPendingRepoRequest ¶
func (m *MetricsServer) IncPendingRepoRequest(repo string)
func (*MetricsServer) IncRedisRequest ¶
func (m *MetricsServer) IncRedisRequest(failed bool)
func (*MetricsServer) ObserveGitRequestDuration ¶
func (m *MetricsServer) ObserveGitRequestDuration(repo string, requestType GitRequestType, duration time.Duration)
func (*MetricsServer) ObserveRedisRequestDuration ¶
func (m *MetricsServer) ObserveRedisRequestDuration(duration time.Duration)
Click to show internal directories.
Click to hide internal directories.