Closed Civil closed 7 years ago
Maybe this will help?
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
message Point {
uint32 timestamp = 1;
double value = 2;
}
message Metric {
string metric = 1;
repeated Point points = 2 [(gogoproto.nullable) = false];
}
Thanks! Missed that.
My pleasure. May I ask where you are using gogoprotobuf?
Mainly here: https://github.com/go-graphite/carbonzipper/tree/master/carbonzipperpb3
I'm also writing graphite-compatible relay and ideally I want to send protobuf messages across the pipeline, but it's not on github yet.
Cool could I add carbonzipper
to the gogoprotobuf user list, or is it too early?
Well, it have some users at this moment. That's actually 4 pieces of software: go-graphite/carbonzipper, go-graphite/carbonapi, go-graphite/carbonsearch and lomik/go-carbon.
So I think yes, you can, we are using it for approx. 2 years.
Really cool :)
How about I add go-carbon
and go-graphite
. That seems like its the more official names?
That's ok :)
As about go-graphite it might still be better known as a carbonapi and carbonzipper, because for a really long time it was stored in separate repos.
As far as I know it's used by several companies, like eBay Classifieds group and Slack (there was a "Our many monsters" talk on Monitorama 2017 where they've mentioned that). So maybe it's better to mention that as "carbonzipper" stack with link to go-graphite org repos. But that's up to you.
Cool I'll do that. On a side note I don't see carbonapi or carbonzipper or go-graphite being used here at eBay Classifieds Group. Maybe you can give me a contact on someone I can ask to confirm.
@favoretti (https://github.com/favoretti)
All over the place in fact :) @deniszh
Confirming that 👍
My bad. Thats great news :)
Maybe I'm missing something, but I can't see flag that will allow me to make repeated field to be unmarshaled to slice of structs, not to slice of pointers.
Example:
This will result in following structs:
First one is ok, but I thought maybe there is a way to make 'Points' field in second one to be just a slice of Point, not slice of pointers?
There are two reasons for that: