watcher

package
v0.0.0-...-c7e85b4 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2019 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SyncTimeMetric = prometheus.NewHistogram(prometheus.HistogramOpts{
		Namespace: "balanced_controllers",
		Name:      "sync_time",
		Help:      "Controller Sync Time",
		Buckets:   prometheus.ExponentialBuckets(100000, float64(2), 20),
	})
	LastSyncTime = prometheus.NewGauge(prometheus.GaugeOpts{
		Namespace: "balanced_controllers",
		Name:      "sync_time_last",
		Help:      "Controller Last Sync Time",
	})
)

Functions

This section is empty.

Types

type ConfigController

type ConfigController struct {
	Concurrency uint `json:"concurrency"`
}

type Controller

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

func (*Controller) Run

func (c *Controller) Run(workers uint) func(<-chan struct{})

type ControllerHandlers

type ControllerHandlers struct {
	// handlers that would be called during controller start up; during service manager population
	// WARNING: do not rely on serviceManager.List() or .Get() operations during service manager population
	// as it will not contain the full set of Kubernetes Services and Endpoints
	InitServiceOnChangeHandlers   []v1alpha1.ServiceOnChangeHandler
	InitEndpointsOnChangeHandlers []v1alpha1.EndpointOnChangeHandler

	// handlers that would be called during actual Kubernetes service/endpoints changes
	// it is safe to rely on serviceManager.List() or .Get() operations at this point
	ServiceOnChangeHandlers   []v1alpha1.ServiceOnChangeHandler
	EndpointsOnChangeHandlers []v1alpha1.EndpointOnChangeHandler

	// handlers to be done post sync (eg. garbage collection)
	PostSyncHandlers []PostSyncHandler
}

type PostSyncHandler

type PostSyncHandler func() error

Jump to

Keyboard shortcuts

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