syntax = "proto3";
package carbonpb;

import "github.com/gogo/protobuf/gogoproto/gogo.proto";
// based on original graphite proto
// https://github.com/graphite-project/carbon/blob/master/lib/carbon/carbon.proto

message Point {
  uint32 timestamp = 1;
  double value = 2;
}

message Metric {
  string metric = 1;
  repeated Point points = 2 [(gogoproto.nullable) = false];
}

message Payload {
  repeated Metric metrics = 1;
}

message CacheRequest {
	repeated string metrics = 1;
}

service Carbon {
	// Same as carbonlink
	rpc CacheQuery(CacheRequest) returns (Payload) {}
}
