api

package
v0.0.0-...-5abb786 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HealthServer

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

HealthServer proporciona una API HTTP para monitorizar la salud de etcd

func NewHealthServer

func NewHealthServer(etcdClient *client.Client, cfg *config.Config, processID int, dataDir string) *HealthServer

NewHealthServer crea un nuevo servidor de API de salud

func (*HealthServer) Start

func (s *HealthServer) Start(address string) error

Start begins serving the health API

func (*HealthServer) StartAsync

func (s *HealthServer) StartAsync(address string)

StartAsync begins serving the health API in a goroutine

func (*HealthServer) StartMonitoring

func (s *HealthServer) StartMonitoring(interval time.Duration)

StartMonitoring starts periodic health checks

func (*HealthServer) StopMonitoring

func (s *HealthServer) StopMonitoring()

StopMonitoring stops periodic health checks

type MetricsCollector

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

MetricsCollector maneja las métricas de Prometheus para etcd

func NewMetricsCollector

func NewMetricsCollector(etcdClient *client.Client, processID int, dataDir string) *MetricsCollector

NewMetricsCollector crea un nuevo colector de métricas

func (*MetricsCollector) TrackCompaction

func (c *MetricsCollector) TrackCompaction()

TrackCompaction registra una operación de compactación

func (*MetricsCollector) TrackOperation

func (c *MetricsCollector) TrackOperation(operation string, duration time.Duration, success bool)

TrackOperation registra una operación y su duración

func (*MetricsCollector) UpdateMetrics

func (c *MetricsCollector) UpdateMetrics()

UpdateMetrics actualiza todas las métricas

Jump to

Keyboard shortcuts

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