engine

package
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: 23 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

type Engine interface {
	// Start starts the archiver goroutines
	Start() error
	// Cleanup cleans the archiver engine before
	// restart
	Cleanup()
}

Engine defines the interface used to query a peloton component for data and then archive that data to secondary storage using message queue

func New

func New(
	cfg config.Config,
	scope tally.Scope,
	mux *nethttp.ServeMux,
	discovery leader.Discovery,
	inbounds []transport.Inbound) (Engine, error)

New creates a new Archiver Engine.

type Metrics

type Metrics struct {
	ArchiverStart             tally.Counter
	ArchiverJobQuerySuccess   tally.Counter
	ArchiverJobQueryFail      tally.Counter
	ArchiverJobDeleteSuccess  tally.Counter
	ArchiverJobDeleteFail     tally.Counter
	ArchiverNoJobsInTimerange tally.Counter

	PodDeleteEventsFail    tally.Counter
	PodDeleteEventsSuccess tally.Counter

	ArchiverRun                tally.Counter
	ArchiverRunDuration        tally.Timer
	PodDeleteEventsRun         tally.Counter
	PodDeleteEventsRunDuration tally.Timer
}

Metrics is the struct containing all the counters that track internal state of archiver engine.

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

Jump to

Keyboard shortcuts

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