mirror of
https://github.com/kubernetes-sigs/node-feature-discovery.git
synced 2025-03-05 16:27:05 +00:00
Enable transmitting the discovered "raw" features over the gRPC API. Extend pkg/api/feature with protobuf and gRPC code. In this, utilize go-to-protobuf from k8s code-generator for auto-generating the gRPC interface from golang code. The tool can be Installed with: go install k8s.io/code-generator/cmd/go-to-protobuf@v0.20.7 The auto-generated code is (re-)generated/updated with "make apigen".
59 lines
1.7 KiB
Protocol Buffer
59 lines
1.7 KiB
Protocol Buffer
/*
|
|
Copyright 2021 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.
|
|
*/
|
|
|
|
|
|
// This file was autogenerated by go-to-protobuf. Do not edit it manually!
|
|
|
|
syntax = "proto2";
|
|
|
|
package feature;
|
|
|
|
// Package-wide variables from generator "generated".
|
|
option go_package = "sigs.k8s.io/node-feature-discovery/pkg/api/feature";
|
|
|
|
// DomainFeatures is the collection of all discovered features of one domain.
|
|
message DomainFeatures {
|
|
map<string, KeyFeatureSet> keys = 1;
|
|
|
|
map<string, ValueFeatureSet> values = 2;
|
|
|
|
map<string, InstanceFeatureSet> instances = 3;
|
|
}
|
|
|
|
// InstanceFeature represents one instance of a complex features, e.g. a device.
|
|
message InstanceFeature {
|
|
map<string, string> attributes = 1;
|
|
}
|
|
|
|
// InstanceFeatureSet is a set of features each of which is an instance having multiple attributes.
|
|
message InstanceFeatureSet {
|
|
repeated InstanceFeature elements = 1;
|
|
}
|
|
|
|
// KeyFeatureSet is a set of simple features only containing names without values.
|
|
message KeyFeatureSet {
|
|
map<string, Nil> elements = 1;
|
|
}
|
|
|
|
// Nil is a dummy empty struct for protobuf compatibility
|
|
message Nil {
|
|
}
|
|
|
|
// ValueFeatureSet is a set of features having string value.
|
|
message ValueFeatureSet {
|
|
map<string, string> elements = 1;
|
|
}
|
|
|