telemetry

package
v0.0.0-...-fb356ce Latest Latest
Warning

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

Go to latest
Published: May 17, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const TelemetrySource = "on-demand-broker"

Variables

This section is empty.

Functions

func Build

func Build(enableLogging bool, serviceOffering config.ServiceOffering, logger *log.Logger) broker.TelemetryLogger

func NewTelemetryLogger

func NewTelemetryLogger(logger *log.Logger, serviceOffering config.ServiceOffering, timer Time) broker.TelemetryLogger

Types

type BaseLog

type BaseLog struct {
	TelemetryTime   string          `json:"telemetry-time"`
	TelemetrySource string          `json:"telemetry-source"`
	ServiceOffering ServiceOffering `json:"service-offering"`
	Event           Event           `json:"event"`
}

type Event

type Event struct {
	Item      string `json:"item"`
	Operation string `json:"operation"`
}

type NoopTelemetryLogger

type NoopTelemetryLogger struct{}

func (*NoopTelemetryLogger) LogInstances

func (t *NoopTelemetryLogger) LogInstances(instanceLister InstanceLister, item string, operation string)

type PerPlanInstancesLog

type PerPlanInstancesLog struct {
	BaseLog
	ServiceInstancesPerPlan ServiceInstancesPerPlan `json:"service-instances-per-plan"`
}

type RealTime

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

func (*RealTime) Now

func (r *RealTime) Now() string

type ServiceInstances

type ServiceInstances struct {
	Total int `json:"total"`
}

type ServiceInstancesPerPlan

type ServiceInstancesPerPlan struct {
	PlanID string `json:"plan-id"`
	Total  int    `json:"total"`
}

type ServiceOffering

type ServiceOffering struct {
	Name string `json:"name"`
}

type TelemetryLogger

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

func (*TelemetryLogger) LogInstances

func (t *TelemetryLogger) LogInstances(instanceLister InstanceLister, item string, operation string)

type Time

type Time interface {
	Now() string
}

type TotalInstancesLog

type TotalInstancesLog struct {
	BaseLog
	ServiceInstances ServiceInstances `json:"service-instances"`
}

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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