results

package
v0.0.0-...-dd7401d Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metric

type Metric struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Metric represents a single dropsonde metric

func NewMetric

func NewMetric(d float64, t int64, ttl time.Duration) *Metric

func (*Metric) GetData

func (m *Metric) GetData() float64

func (*Metric) GetTimestamp

func (m *Metric) GetTimestamp() int64

func (*Metric) HasExpired

func (m *Metric) HasExpired() bool

func (*Metric) Update

func (m *Metric) Update(d float64, t int64, ttl time.Duration)

type Resource

type Resource struct {
	sync.RWMutex

	ValueMetrics   map[string][]*Metric
	CounterMetrics map[string][]*Metric
	// contains filtered or unexported fields
}

Resource represents cloud controller data

func NewResource

func NewResource(deployment, job, index, ip string) *Resource

CreateResource Creates a new resource

func (*Resource) AddMetric

func (r *Resource) AddMetric(e *loggregator_v2.Envelope, l *gosteno.Logger, ttl time.Duration)

func (*Resource) Cleanup

func (r *Resource) Cleanup()

func (*Resource) IsEmpty

func (r *Resource) IsEmpty() bool

func (*Resource) MarshalJSON

func (r *Resource) MarshalJSON() ([]byte, error)

Jump to

Keyboard shortcuts

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