parser

package
v0.0.0-...-ff51d6a Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Name                   string
	GUID                   string
	SpaceID                string
	SpaceName              string
	SpaceURL               string
	OrgName                string
	OrgID                  string
	Host                   string
	Buildpacks             []string
	NumberOfInstances      int
	TotalDiskConfigured    int
	TotalMemoryConfigured  int
	TotalDiskProvisioned   int
	TotalMemoryProvisioned int
	Tags                   []string
	// contains filtered or unexported fields
}

App holds all the needed attribute from an app

type AppParser

type AppParser struct {
	AppCache appCache
	// contains filtered or unexported fields
}

AppParser is used to parse app metrics

func NewAppParser

func NewAppParser(
	cfClient *cloudfoundry.CFClient,
	dcaClient *cloudfoundry.DCAClient,
	cacheWorkers int,
	grabInterval int,
	log *gosteno.Logger,
	customTags []string,
	environment string,
) (*AppParser, error)

NewAppParser create a new AppParser

func (*AppParser) Done

func (am *AppParser) Done() chan bool

func (*AppParser) Parse

func (am *AppParser) Parse(envelope *loggregator_v2.Envelope) ([]metric.MetricPackage, error)

Parse takes an envelope, and extract app metrics from it

func (*AppParser) Stop

func (am *AppParser) Stop()

Stop sends a message on the stopper channel to quit the goroutine refreshing the cache

type InfraParser

type InfraParser struct {
	Environment           string
	DeploymentUUIDRegex   *regexp.Regexp
	JobPartitionUUIDRegex *regexp.Regexp
	CustomTags            []string
}

func NewInfraParser

func NewInfraParser(
	environment string,
	deploymentUUIDRegex *regexp.Regexp,
	jobPartitionUUIDRegex *regexp.Regexp,
	customTags []string) (*InfraParser, error)

func (InfraParser) Parse

func (p InfraParser) Parse(envelope *loggregator_v2.Envelope) ([]metric.MetricPackage, error)

type Parser

type Parser interface {
	Parse(envelope *loggregator_v2.Envelope) ([]metric.MetricPackage, error)
}

Jump to

Keyboard shortcuts

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