schedwatch

package
v0.13.6 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartSchedulerWatcher

func StartSchedulerWatcher(
	ctx context.Context,
	parentLogger *zap.Logger,
	kubeClient *kubernetes.Clientset,
	metrics watch.Metrics,
	eventBroker *pubsub.Broker[WatchEvent],
	schedulerName string,
) (*watch.Store[corev1.Pod], error)

func WatchSchedulerUpdates

func WatchSchedulerUpdates(
	ctx context.Context,
	logger *zap.Logger,
	eventBroker *pubsub.Broker[WatchEvent],
	store *watch.Store[corev1.Pod],
) (SchedulerWatch, *SchedulerInfo, error)

Types

type SchedulerInfo

type SchedulerInfo struct {
	PodName util.NamespacedName
	UID     types.UID
	IP      string
}

func (SchedulerInfo) Format

func (info SchedulerInfo) Format(state fmt.State, verb rune)

func (SchedulerInfo) MarshalLogObject added in v0.10.0

func (s SchedulerInfo) MarshalLogObject(enc zapcore.ObjectEncoder) error

MarshalLogObject implements zapcore.ObjectMarshaler

type SchedulerWatch

type SchedulerWatch struct {
	ReadyQueue <-chan SchedulerInfo
	Deleted    <-chan SchedulerInfo
	// contains filtered or unexported fields
}

SchedulerWatch is the interface returned by WatchSchedulerUpdates

func (SchedulerWatch) ExpectingDeleted

func (w SchedulerWatch) ExpectingDeleted()

func (SchedulerWatch) ExpectingReady

func (w SchedulerWatch) ExpectingReady()

func (SchedulerWatch) Stop

func (w SchedulerWatch) Stop()

func (SchedulerWatch) Using

func (w SchedulerWatch) Using(sched SchedulerInfo)

type WatchEvent

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

func (WatchEvent) Format

func (ev WatchEvent) Format(state fmt.State, verb rune)

func (WatchEvent) MarshalLogObject added in v0.10.0

func (ev WatchEvent) MarshalLogObject(enc zapcore.ObjectEncoder) error

MarshalLogObject implements zapcore.ObjectMarshaler

Jump to

Keyboard shortcuts

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