protobuf generate

This commit is contained in:
Martin Ptáček
2023-06-04 09:03:16 +02:00
parent 0a327b0450
commit 5fa175883a
2 changed files with 6 additions and 4 deletions

View File

@ -1,12 +1,14 @@
# Makefile for protobuf generation for remote write prometheus protocol # Makefile for protobuf generation for "remote write" prometheus protocol
#
# Input: 'proto' folder
# Output: 'protogen' package
.PHONY: protobuf .PHONY: protobuf
SRC_DIR_PROTO=app/src/main/java/com/birdthedeveloper/prometheus/android/prometheus/android/exporter/proto SRC_DIR_PROTO=app/src/main/java/com/birdthedeveloper/prometheus/android/prometheus/android/exporter/proto
DST_DIR_PROTO=../proto-gen/ DST_DIR_PROTO=app/src/main/java/com/birdthedeveloper/prometheus/android/prometheus/android/exporter
protobuf: protobuf:
mkdir -p $(DST_DIR_PROTO) mkdir -p $(DST_DIR_PROTO)
protoc -I=$(SRC_DIR_PROTO) --kotlin_out=$(DST_DIR_PROTO) $(SRC_DIR_PROTO)/remote-write.proto protoc -I=$(SRC_DIR_PROTO) --kotlin_out=$(DST_DIR_PROTO) $(SRC_DIR_PROTO)/remote-write.proto
#TODO

View File

@ -1,6 +1,6 @@
syntax = "proto3"; syntax = "proto3";
package proto; package protogen;
message WriteRequest { message WriteRequest {
repeated TimeSeries timeseries = 1; repeated TimeSeries timeseries = 1;