usageevents

package
v0.0.0-...-e036fed Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2016 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AppDetails = make(map[string]domain.App)
View Source
var OrganizationUsers = make(map[string][]cfclient.User)
View Source
var Orgs []cfclient.Org
View Source
var Spaces []cfclient.Space
View Source
var SpacesUsers = make(map[string][]cfclient.User)

Functions

func GetMapKeyFromAppData

func GetMapKeyFromAppData(orgName string, spaceName string, appName string) string

GetMapKeyFromAppData converts the combo of an app, space, and org into a hashmap key

func ProcessEvents

func ProcessEvents(in <-chan *events.Envelope)

ProcessEvents churns through the firehose channel, processing incoming events.

Types

type Event

type Event struct {
	Msg            string  `json:"message"`
	Type           string  `json:"event_type"`
	Origin         string  `json:"origin"`
	AppID          string  `json:"app_id"`
	Timestamp      int64   `json:"timestamp"`
	SourceType     string  `json:"source_type"`
	MessageType    string  `json:"message_type"`
	SourceInstance string  `json:"source_instance"`
	AppName        string  `json:"app_name"`
	OrgName        string  `json:"org_name"`
	SpaceName      string  `json:"space_name"`
	OrgID          string  `json:"org_id"`
	SpaceID        string  `json:"space_id"`
	CellIP         string  `json:"cell_ip"`
	InstanceIndex  int32   `json:"instance_index"`
	CPUPercentage  float64 `json:"cpu_percentage"`
	MemBytes       uint64  `json:"mem_bytes"`
	DiskBytes      uint64  `json:"disk_bytes"`
}

Event is a struct represented an event augmented/decorated with corresponding app/space/org data.

func ContainerMetric

func ContainerMetric(msg *events.Envelope) Event

func LogMessage

func LogMessage(msg *events.Envelope) Event

LogMessage augments a raw message Envelope with log message metadata.

func (*Event) AnnotateWithAppData

func (e *Event) AnnotateWithAppData()

AnnotateWithAppData adds application specific details to an event by looking up the GUID in the cache.

Jump to

Keyboard shortcuts

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