mirror of
https://github.com/kubernetes-sigs/node-feature-discovery.git
synced 2025-03-06 08:47:04 +00:00
Setup the topologyupdater API for gRPC communication of nfd-topology-updater with master We generate pb.go file to reflect latest dependency changes using github.com/golang/protobuf/protoc-gen-go and generate grpc files via: `protoc pkg/topologyupdater/topology-updater.proto --go_out=plugins=grpc:.` Please refer to: https://github.com/k8stopologyawareschedwg/noderesourcetopology-api/blob/master/pkg/apis/topology/v1alpha1/types.go Co-Authored-by: Artyom Lukianov <alukiano@redhat.com> Co-Authored-by: Francesco Romani <fromani@redhat.com> Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
60 lines
1.4 KiB
Protocol Buffer
60 lines
1.4 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.
|
|
*/
|
|
syntax = "proto3";
|
|
|
|
//option go_package = "topologyupdater";
|
|
|
|
package topologyupdater;
|
|
|
|
service NodeTopology{
|
|
rpc UpdateNodeTopology(NodeTopologyRequest) returns (NodeTopologyResponse);
|
|
}
|
|
|
|
message NodeTopologyRequest {
|
|
string nfd_version = 1;
|
|
string node_name = 2;
|
|
repeated string topology_policies = 3;
|
|
repeated Zone zones = 4;
|
|
}
|
|
|
|
message Zone {
|
|
string name = 1;
|
|
string type = 2;
|
|
string parent = 3;
|
|
repeated CostInfo costs = 4;
|
|
repeated AttributeInfo attributes = 5;
|
|
repeated ResourceInfo resources = 6;
|
|
|
|
}
|
|
|
|
message CostInfo {
|
|
string name = 1;
|
|
int32 value = 2 ;
|
|
}
|
|
|
|
message AttributeInfo {
|
|
string name = 1;
|
|
string value = 2 ;
|
|
}
|
|
|
|
message ResourceInfo {
|
|
string name = 1;
|
|
string allocatable = 2;
|
|
string capacity = 3;
|
|
}
|
|
|
|
message NodeTopologyResponse {
|
|
}
|