Documentation
¶
Index ¶
- Constants
- func FormatCompilationTelemetry(telByAsset map[string]network.RuntimeCompilationTelemetry) map[string]*model.RuntimeCompilationTelemetry
- func FormatConnTelemetry(tel *network.ConnectionsTelemetry) *model.ConnectionsTelemetry
- func FormatConnection(conn network.ConnectionStats, routes map[string]RouteIdx, ...) *model.Connection
- func FormatHTTPStats(httpData map[http.Key]http.RequestStats) map[http.Key]*model.HTTPAggregations
- type Marshaler
- type RouteIdx
- type Unmarshaler
Constants ¶
const ContentTypeJSON = "application/json"
ContentTypeJSON holds the HTML content-type of a JSON payload
const ContentTypeProtobuf = "application/protobuf"
ContentTypeProtobuf holds the HTML content-type of a Protobuf payload
Variables ¶
This section is empty.
Functions ¶
func FormatCompilationTelemetry ¶ added in v0.9.0
func FormatCompilationTelemetry(telByAsset map[string]network.RuntimeCompilationTelemetry) map[string]*model.RuntimeCompilationTelemetry
FormatCompilationTelemetry converts telemetry from its internal representation to a protobuf message
func FormatConnTelemetry ¶ added in v0.9.0
func FormatConnTelemetry(tel *network.ConnectionsTelemetry) *model.ConnectionsTelemetry
FormatConnTelemetry converts telemetry from its internal representation to a protobuf message
func FormatConnection ¶
func FormatConnection( conn network.ConnectionStats, routes map[string]RouteIdx, httpStats *model.HTTPAggregations, dnsFormatter *dnsFormatter, ipc ipCache, ) *model.Connection
FormatConnection converts a ConnectionStats into an model.Connection
func FormatHTTPStats ¶ added in v0.9.0
func FormatHTTPStats(httpData map[http.Key]http.RequestStats) map[http.Key]*model.HTTPAggregations
FormatHTTPStats converts the HTTP map into a suitable format for serialization
Types ¶
type Marshaler ¶
type Marshaler interface { Marshal(conns *network.Connections) ([]byte, error) ContentType() string }
Marshaler is an interface implemented by all Connections serializers
func GetMarshaler ¶
GetMarshaler returns the appropriate Marshaler based on the given accept header
type RouteIdx ¶ added in v0.9.0
RouteIdx stores the route and the index into the route collection for a route
type Unmarshaler ¶
type Unmarshaler interface {
Unmarshal([]byte) (*model.Connections, error)
}
Unmarshaler is an interface implemented by all Connections deserializers
func GetUnmarshaler ¶
func GetUnmarshaler(ctype string) Unmarshaler
GetUnmarshaler returns the appropriate Unmarshaler based on the given content type