Help us shape the future of Go! Take the 2026 Go Developer Survey

doublewrite

package
v1.18.16 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Interval is the refresh interval for the Double Write Metric Reporter
	Interval = "double-write-metric-reporter-interval"
)

Variables

View Source
var Cell = cell.Module(
	"double-write-metric-reporter",
	"The Double-Write Metric Reporter compares identities in KVStore and CRD",

	cell.Config(defaultConfig),

	cell.Invoke(registerDoubleWriteMetricReporter),

	metrics.Metric(NewMetrics),
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Interval time.Duration `mapstructure:"double-write-metric-reporter-interval"`
}

func (Config) Flags

func (def Config) Flags(flags *pflag.FlagSet)

type DoubleWriteMetricReporter

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

func (*DoubleWriteMetricReporter) Start

func (*DoubleWriteMetricReporter) Stop

type Metrics

type Metrics struct {
	// CRDIdentities records the total number of CRD identities
	// Requires the Double-Write Identity allocation mode to be enabled
	CRDIdentities metric.Gauge

	// KVStoreIdentities records the total number of identities in the KVStore
	// Requires the Double-Write Identity allocation mode to be enabled
	KVStoreIdentities metric.Gauge

	// CRDOnlyIdentities records the number of CRD identities not present in the KVStore
	// Requires the Double-Write Identity allocation mode to be enabled
	CRDOnlyIdentities metric.Gauge

	// KVStoreOnlyIdentities records the number of identities in the KVStore not present as a CRD
	// Requires the Double-Write Identity allocation mode to be enabled
	KVStoreOnlyIdentities metric.Gauge
}

func NewMetrics

func NewMetrics() *Metrics

type NoOpHandlerWithListDone

type NoOpHandlerWithListDone struct {
	doublewrite.NoOpHandler
	// contains filtered or unexported fields
}

func (NoOpHandlerWithListDone) OnListDone

func (h NoOpHandlerWithListDone) OnListDone()

Jump to

Keyboard shortcuts

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