metrics

package
v0.0.0-...-a514ca2 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WatchNodes

func WatchNodes(ctx context.Context, nodes scheduler.SchedulerServiceServer)

WatchNodes updates the node state and resource counters every 5 seconds. This blocks until the context is canceled.

func WatchTaskStates

func WatchTaskStates(ctx context.Context, counter TaskStateCounter)

WatchTaskStates updates the task state counter every 5 seconds. This blocks until the context is canceled.

Types

type TaskStateCounter

type TaskStateCounter interface {
	// TaskStateCounts returns the number of tasks in each state.
	TaskStateCounts(context.Context) (map[string]int32, error)
}

TaskStateCounter is implemented by database backends which provide queries for counting tasks in each state.

Jump to

Keyboard shortcuts

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