syncstate

package
v1.16.2 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cell = cell.Module(
	"sync",
	"ClusterMesh Sync",

	metrics.Metric(MetricsProvider),
	cell.Provide(new),
)

Functions

This section is empty.

Types

type Metrics

type Metrics struct {
	// BootstrapDuration tracks the duration in seconds until ready to serve requests.
	BootstrapDuration metric.Vec[metric.Gauge]
}

Metrics contains metrics that should only be exported by the clustermesh-apiserver or kvstoremesh.

func MetricsProvider

func MetricsProvider() Metrics

type SyncState

type SyncState struct {
	*lock.StoppableWaitGroup
}

SyncState is a wrapper around lock.StoppableWaitGroup used to keep track of the synchronization of various resources to the kvstore.

func (SyncState) Complete

func (ss SyncState) Complete() bool

Complete returns true if all resources have been synchronized to the kvstore.

func (SyncState) WaitForResource

func (ss SyncState) WaitForResource() func(context.Context)

WaitForResource adds a resource to the SyncState and returns a callback function that should be called when the resource has been synchronized.

Jump to

Keyboard shortcuts

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