tracker

package
v0.0.0-...-ebd413c Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2017 License: Apache-2.0 Imports: 2 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Status

type Status struct {
	LastUpdated     Updates          `json:"last_updated"`
	LastError       error            `json:"last_error"`
	ValidationError *ValidationError `json:"validation_error"`
}

type Tracker

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

Tracker is responsible for keeping track of state and updates throughout Beethoven. It serves as a common information hub to the API

func New

func New(cfg *config.Config) *Tracker

func (*Tracker) ClearValidationError

func (tr *Tracker) ClearValidationError()

func (*Tracker) GetStatus

func (tr *Tracker) GetStatus() Status

func (*Tracker) SetError

func (tr *Tracker) SetError(err error)

func (*Tracker) SetLastConfigRendered

func (tr *Tracker) SetLastConfigRendered(t time.Time)

SetLastConfigRendered will set the time we rendered a temporary config

func (*Tracker) SetLastConfigValid

func (tr *Tracker) SetLastConfigValid(t time.Time)

SetLastConfigValid captures the last time we had a successful rendered config validate via the proxy

func (*Tracker) SetLastProxyReload

func (tr *Tracker) SetLastProxyReload(t time.Time)

SetLastProxyReload the last time we executed a reload on the proxy

func (*Tracker) SetLastSync

func (tr *Tracker) SetLastSync(t time.Time)

SetLastSync will set the time we fetched a snapshot from Marathon

func (*Tracker) SetValidationError

func (tr *Tracker) SetValidationError(verr *ValidationError)

type Updates

type Updates struct {
	LastSync           time.Time `json:"last_sync"`
	LastConfigRendered time.Time `json:"last_config_rendered"`
	LastConfigValid    time.Time `json:"last_config_valid"`
	LastProxyReload    time.Time `json:"last_proxy_reload"`
}

type ValidationError

type ValidationError struct {
	Error        error  `json:"error"`
	FailedConfig string `json:"failed_config"`
}

Jump to

Keyboard shortcuts

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