avail

package
v0.0.0-...-db13635 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 2 more Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DetectTimes = promauto.NewCounter(prometheus.CounterOpts{
		Name: "detect_times",
		Help: "The times of availability detecting",
	})

	ReadFailureTimes = promauto.NewCounter(prometheus.CounterOpts{
		Name: "read_failure_detect_times",
		Help: "The failure times of read detecting",
	})

	WriteFailureTimes = promauto.NewCounter(prometheus.CounterOpts{
		Name: "write_failure_detect_times",
		Help: "The failure times of write detecting",
	})

	ReadLatency = promauto.NewGauge(prometheus.GaugeOpts{
		Name: "read_latency_ms",
		Help: "The latency of read data in milliseconds",
	})

	WriteLatency = promauto.NewGauge(prometheus.GaugeOpts{
		Name: "write_latency_ms",
		Help: "The latency of write data in milliseconds",
	})
)

Functions

func RandStringBytes

func RandStringBytes(n int) string

Generate a random string.

Types

type Detector

type Detector interface {
	Run(tom *tomb.Tomb) error
}

Detector periodically checks the service availability of the Pegasus cluster.

func NewDetector

func NewDetector(detectInterval time.Duration,
	detectTimeout time.Duration, partitionCount int) Detector

NewDetector returns a service-availability detector.

Jump to

Keyboard shortcuts

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