Documentation ¶
Index ¶
- func CancelUpdateMetricsFunctions()
- func GetDefaultUpdateMetricsInterval() time.Duration
- func GetUpdateMetricsFunctionInterval(name string) *time.Duration
- func RegisterUpdateMetricsFunction(name string, f UpdateMetricsFunction)
- func RegisterUpdateMetricsFunctionWithInterval(name string, f UpdateMetricsFunction, interval time.Duration)
- func SetDefaultUpdateMetricsInterval(interval time.Duration)
- func UpdateAPIRateLimitingMetrics(ctx context.Context) error
- func UpdateBatchMetrics(ctx context.Context) error
- func UpdateGraphMetrics(ctx context.Context) error
- func UpdateMetrics(ctx context.Context)
- func UpdateStorageMetrics(ctx context.Context) error
- type UpdateMetricsFunction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CancelUpdateMetricsFunctions ¶ added in v0.3.0
func CancelUpdateMetricsFunctions()
CancelUpdateMetricsFunctions calls the contexts cancel() methods of all interval processes.
func GetDefaultUpdateMetricsInterval ¶ added in v0.3.0
GetDefaultUpdateMetricsInterval gets default interval
func GetUpdateMetricsFunctionInterval ¶ added in v0.3.0
GetUpdateMetricsFunctionInterval returns the interval the update metrics is currently registered at.
func RegisterUpdateMetricsFunction ¶ added in v0.3.0
func RegisterUpdateMetricsFunction(name string, f UpdateMetricsFunction)
RegisterUpdateMetricsFunction allows you to register a function that will update prometheus metrics.
func RegisterUpdateMetricsFunctionWithInterval ¶ added in v0.3.0
func RegisterUpdateMetricsFunctionWithInterval(name string, f UpdateMetricsFunction, interval time.Duration)
RegisterUpdateMetricsFunctionWithInterval allows you to register a function that will update prometheus metrics every interval.
func SetDefaultUpdateMetricsInterval ¶ added in v0.3.0
SetDefaultUpdateMetricsInterval sets default interval
func UpdateAPIRateLimitingMetrics ¶ added in v0.6.0
UpdateAPIRateLimitingMetrics updates api metrics.
func UpdateBatchMetrics ¶
UpdateBatchMetrics updates batch metrics
func UpdateGraphMetrics ¶
UpdateGraphMetrics updates graph metrics
func UpdateMetrics ¶
UpdateMetrics main update metrics process. It spawns goroutines of updateMetricsWithInterval() which are responsible for running the update metrics functions every desired update intervals. This method loops forever so it needs to be detached.
func UpdateStorageMetrics ¶ added in v0.2.0
UpdateStorageMetrics updates storage metrics.
Types ¶
type UpdateMetricsFunction ¶ added in v0.2.0
UpdateMetricsFunction is the function type which needs to respected to create update metrics functions.
func GetUpdateMetricsFunction ¶ added in v0.3.0
func GetUpdateMetricsFunction(name string) UpdateMetricsFunction
GetUpdateMetricsFunction returns the update metrics function associated to `name`. It will only return a result if the function has previously been registered once. It does not matter if the function has been un-registered.
func UnregisterUpdateMetricsFunctions ¶ added in v0.3.0
func UnregisterUpdateMetricsFunctions(name string) UpdateMetricsFunction
UnregisterUpdateMetricsFunctions allows you to unregister an update functions metrics which has been previously registered.