lib/prompbmarshal: move WriteRequest proto definition to the correct place

This commit is contained in:
Aliaksandr Valialkin 2024-01-15 23:31:19 +02:00
parent 51cdf3676b
commit bfa73ebdf3
No known key found for this signature in database
GPG key ID: 52C003EE2BCDB9EB

View file

@ -52,9 +52,6 @@ type Sample struct {
// MarshalProtobuf appends protobuf-marshaled wr to dst and returns the result.
func (wr *WriteRequest) MarshalProtobuf(dst []byte) []byte {
// message WriteRequest {
// repeated TimeSeries timeseries = 1;
// }
m := mp.Get()
wr.appendToProtobuf(m.MessageMarshaler())
dst = m.Marshal(dst)
@ -63,6 +60,9 @@ func (wr *WriteRequest) MarshalProtobuf(dst []byte) []byte {
}
func (wr *WriteRequest) appendToProtobuf(mm *easyproto.MessageMarshaler) {
// message WriteRequest {
// repeated TimeSeries timeseries = 1;
// }
tss := wr.Timeseries
for i := range tss {
tss[i].appendToProtobuf(mm.AppendMessage(1))