Documentation ¶
Index ¶
- type APIMetrics
- func (m *APIMetrics) ExecuteWithMetrics(command string, errCounter int, f func() error) (error, int)
- func (m *APIMetrics) Failure(command string)
- func (m *APIMetrics) Finish(command string, startTime time.Time)
- func (m *APIMetrics) RegisterMetrics()
- func (m *APIMetrics) Start(command string, startTime time.Time)
- func (m *APIMetrics) Success(command string)
- type APIMetricsInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIMetrics ¶
type APIMetrics struct { SuccessfulCounter map[string]prometheus.Counter FailedCounter map[string]prometheus.Counter LastStart map[string]prometheus.Gauge LastFinish map[string]prometheus.Gauge LastDuration map[string]prometheus.Gauge LastStatus map[string]prometheus.Gauge LastBackupSizeLocal prometheus.Gauge LastBackupSizeRemote prometheus.Gauge NumberBackupsRemote prometheus.Gauge NumberBackupsRemoteBroken prometheus.Gauge NumberBackupsLocal prometheus.Gauge NumberBackupsRemoteExpected prometheus.Gauge NumberBackupsLocalExpected prometheus.Gauge InProgressCommands prometheus.Gauge SubCommands map[string][]string // contains filtered or unexported fields }
func NewAPIMetrics ¶
func NewAPIMetrics() *APIMetrics
func (*APIMetrics) ExecuteWithMetrics ¶
func (*APIMetrics) Failure ¶
func (m *APIMetrics) Failure(command string)
func (*APIMetrics) RegisterMetrics ¶
func (m *APIMetrics) RegisterMetrics()
RegisterMetrics resister prometheus metrics and define allowed measured commands list
func (*APIMetrics) Success ¶
func (m *APIMetrics) Success(command string)
Click to show internal directories.
Click to hide internal directories.