Skip to content

Commit

Permalink
Merge pull request #646 from marquiz/devel/grpc-raw-features
Browse files Browse the repository at this point in the history
grpc: extend the API to send raw features
  • Loading branch information
k8s-ci-robot authored Nov 16, 2021
2 parents c29ab3b + 47e7c47 commit 389ff52
Show file tree
Hide file tree
Showing 11 changed files with 2,211 additions and 42 deletions.
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ go 1.17
require (
github.com/fsnotify/fsnotify v1.4.9
github.com/ghodss/yaml v1.0.0
github.com/gogo/protobuf v1.3.2
github.com/golang/protobuf v1.5.2
github.com/google/go-cmp v0.5.5
github.com/jaypipes/ghw v0.8.1-0.20210827132705-c7224150a17e
Expand Down
16 changes: 16 additions & 0 deletions hack/boilerplate.go.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
Copyright YEAR The Kubernetes Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

16 changes: 16 additions & 0 deletions pkg/api/feature/generate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/sh -ex

# go-to-protobuf seems unable to run in the package directory -> move to parent dir
cd ..
go-to-protobuf \
--output-base=. \
--go-header-file ../../hack/boilerplate.go.txt \
--proto-import ../../vendor \
--packages ./feature=feature \
--keep-gogoproto=false \
--apimachinery-packages "-k8s.io/apimachinery/pkg/util/intstr"
cd -

# Mangle the go_package option to comply with newer versions protoc-gen-go
sed s',go_package =.*,go_package = "sigs.k8s.io/node-feature-discovery/pkg/api/feature";,' \
-i generated.proto
Loading

0 comments on commit 389ff52

Please sign in to comment.