Fix creation of protobuf fields

This commit is contained in:
beorn7 2015-09-18 19:00:53 +02:00 committed by Fabian Reinartz
parent 64187e59ce
commit 90f594c9fb

View file

@ -95,8 +95,8 @@ func (h *Handler) federation(w http.ResponseWriter, req *http.Request) {
}
}
protMetric.TimestampMs = (*int64)(&sp.Timestamp)
protMetric.Untyped.Value = (*float64)(&sp.Value)
protMetric.TimestampMs = proto.Int64(int64(sp.Timestamp))
protMetric.Untyped.Value = proto.Float64(float64(sp.Value))
if err := enc.Encode(protMetricFam); err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)