mirror of https://github.com/prometheus/prometheus
Merge pull request #179 from prometheus/feature/protocol-buffer-descriptor-inclusion
Include generated Protocol Buffer descriptor.pull/182/head
commit
3ff916d209
2
Makefile
2
Makefile
|
@ -76,7 +76,7 @@ test: build
|
|||
go test ./utility/... $(GO_TEST_FLAGS)
|
||||
go test ./web/... $(GO_TEST_FLAGS)
|
||||
|
||||
web: preparation
|
||||
web: preparation model
|
||||
$(MAKE) -C web
|
||||
|
||||
.PHONY: advice binary build clean documentation format model package preparation run search_index source_path test
|
||||
|
|
|
@ -11,14 +11,18 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
all: generated
|
||||
|
||||
SUFFIXES:
|
||||
|
||||
MAKE_ARTIFACTS = generated-stamp
|
||||
|
||||
all: generated
|
||||
include ../Makefile.INCLUDE
|
||||
|
||||
generated: generated-stamp
|
||||
|
||||
generated-stamp: data.proto
|
||||
protoc --go_out=generated/ data.proto
|
||||
protoc --proto_path=$(PREFIX)/include:. --go_out=generated/ --descriptor_set_out=generated/descriptor.blob data.proto
|
||||
touch $@
|
||||
|
||||
clean:
|
||||
|
|
|
@ -11,7 +11,9 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package dto;
|
||||
package io.prometheus;
|
||||
|
||||
import "google/protobuf/descriptor.proto";
|
||||
|
||||
message LabelPair {
|
||||
optional string name = 1;
|
||||
|
|
|
@ -1,4 +1,2 @@
|
|||
*.cc
|
||||
*.go
|
||||
*.h
|
||||
*.o
|
||||
data.pb.go
|
||||
descriptor.blob
|
||||
|
|
|
@ -13,10 +13,16 @@
|
|||
|
||||
all: blob
|
||||
|
||||
blob:
|
||||
blob: static/generated/protocol_buffer.descriptor
|
||||
$(MAKE) -C blob
|
||||
|
||||
clean:
|
||||
$(MAKE) -C blob clean
|
||||
|
||||
static/generated:
|
||||
mkdir -vp static/generated
|
||||
|
||||
static/generated/protocol_buffer.descriptor: static/generated ../model/generated/descriptor.blob
|
||||
cp ../model/generated/descriptor.blob -f $@
|
||||
|
||||
.PHONY: blob clean
|
||||
|
|
|
@ -13,10 +13,13 @@
|
|||
|
||||
all: files.go
|
||||
|
||||
SUFFIXES:
|
||||
|
||||
files.go: $(shell find ../templates/ ../static/ -type f)
|
||||
../../utility/embed-static.sh ../static ../templates | gofmt > $@
|
||||
|
||||
clean:
|
||||
-rm files.go
|
||||
-rm -rf generated
|
||||
|
||||
.PHONY: clean
|
||||
|
|
|
@ -16,8 +16,9 @@ const (
|
|||
)
|
||||
|
||||
var mimeMap = map[string]string{
|
||||
"css": "text/css",
|
||||
"js": "text/javascript",
|
||||
"css": "text/css",
|
||||
"js": "text/javascript",
|
||||
"descriptor": "application/vnd.google.protobuf;proto=google.protobuf.FileDescriptorSet",
|
||||
}
|
||||
|
||||
func GetFile(bucket string, name string) ([]byte, error) {
|
||||
|
|
Loading…
Reference in New Issue