event

package
Version: v0.0.0-...-a69e935 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2019 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Listener

type Listener interface {
	OnV0Events(events []*pbeventstream.Event)

	Start()
	Stop()
}

Listener is the interface for StatusUpdate listener

type Metrics

type Metrics struct {
	SkipOrphanTasksTotal tally.Counter

	TasksFailedTotal    tally.Counter
	TasksLostTotal      tally.Counter
	TasksKilledTotal    tally.Counter
	TasksSucceededTotal tally.Counter
	TasksRunningTotal   tally.Counter
	TasksLaunchedTotal  tally.Counter
	TasksStartingTotal  tally.Counter

	TasksHealthyTotal   tally.Counter
	TasksUnHealthyTotal tally.Counter

	TasksReconciledTotal tally.Counter

	// metrics for in-place update/restart success rate
	TasksInPlacePlacementTotal   tally.Counter
	TasksInPlacePlacementSuccess tally.Counter

	TasksFailedReason map[int32]tally.Counter
}

Metrics is the struct containing all the counters that track internal state of the task updater.

func NewMetrics

func NewMetrics(scope tally.Scope) *Metrics

NewMetrics returns a new Metrics struct, with all metrics initialized and rooted at the given tally.Scope

type StatusProcessor

type StatusProcessor interface {
	ProcessStatusUpdate(ctx context.Context, event *statusupdate.Event) error
	ProcessListeners(event *statusupdate.Event)
}

StatusProcessor is the interface to process a task status update

type StatusUpdate

type StatusUpdate interface {
	Start()
	Stop()
}

StatusUpdate is the interface for task status updates

func NewTaskStatusUpdate

func NewTaskStatusUpdate(
	d *yarpc.Dispatcher,
	jobStore storage.JobStore,
	taskStore storage.TaskStore,
	volumeStore storage.PersistentVolumeStore,
	jobFactory cached.JobFactory,
	goalStateDriver goalstate.Driver,
	listeners []Listener,
	parentScope tally.Scope,
	hmVersion api.Version,
) StatusUpdate

NewTaskStatusUpdate creates a statusUpdate

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL