import "github.com/cloudfoundry/sonde-go/events" httpEvent := &events.HttpStartStop{ StartTimestamp: 123456789, StopTimestamp: 123456790, RequestId: "123", PeerType: events.PeerType_Client, Method: events.Method_GET, Uri: "http://example.com", } envelope := &events.Envelope{ Timestamp: 1234567890, EventType: events.Envelope_HttpStartStop, Origin: "example.com", Deployment: &events.Deployment{}, Job: "my-job", Index: "0", HttpStartStop: httpEvent, }
import "github.com/cloudfoundry/sonde-go/events" valueMetricEvent := &events.ValueMetric{ Name: "my-metric", Value: 123.45, Unit: "Count", } envelope := &events.Envelope{ Timestamp: 1234567890, EventType: events.Envelope_ValueMetric, Origin: "example.com", Deployment: &events.Deployment{}, Job: "my-job", Index: "0", ValueMetric: valueMetricEvent, }The github.com/cloudfoundry/sonde-go/events package library is part of the Cloud Foundry Go libraries and provides a way to create and manipulate events in Cloud Foundry.