1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2024-12-14 11:57:51 +00:00

Merge pull request #602 from marquiz/devel/go-generate

Utilize go generate
This commit is contained in:
Kubernetes Prow Robot 2021-09-21 06:16:24 -07:00 committed by GitHub
commit 9cf732b64e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 174 additions and 140 deletions

View file

@ -98,15 +98,10 @@ templates:
-e "}; /$$end/p; d }" -i deployment/helm/node-feature-discovery/values.yaml
@rm nfd-worker.conf.tmp
mock:
mockery --name=LabelSource --dir=source --inpkg --note="Re-generate by running 'make mock'"
mockery --name=APIHelpers --dir=pkg/apihelper --inpkg --note="Re-generate by running 'make mock'"
mockery --name=LabelerClient --dir=pkg/labeler --inpkg --note="Re-generate by running 'make mock'"
mockery --name=NodeTopologyClient --dir=pkg/topologyupdater --inpkg --note="Re-generate by running 'make mock'"
apigen:
protoc --go_opt=paths=source_relative --go_out=plugins=grpc:. pkg/labeler/labeler.proto
protoc --go_opt=paths=source_relative --go_out=plugins=grpc:. pkg/topologyupdater/topology-updater.proto
generate:
go mod vendor
go generate ./cmd/... ./pkg/... ./source/...
rm -rf vendor/
gofmt:
@$(GO_FMT) -w -l $$(find . -name '*.go')

View file

@ -16,6 +16,8 @@ limitations under the License.
package apihelper
//go:generate mockery --name=APIHelpers --inpkg
import (
topologyclientset "github.com/k8stopologyawareschedwg/noderesourcetopology-api/pkg/generated/clientset/versioned"
api "k8s.io/api/core/v1"

View file

@ -1,7 +1,5 @@
// Code generated by mockery v1.0.0. DO NOT EDIT.
// Re-generate by running 'make mock'
package apihelper
import (

20
pkg/labeler/doc.go Normal file
View file

@ -0,0 +1,20 @@
/*
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.
*/
package labeler
//go:generate protoc --go_opt=paths=source_relative --go_out=plugins=grpc:. labeler.proto
//go:generate mockery --name=LabelerClient --inpkg

View file

@ -15,14 +15,15 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc-gen-go v1.23.0
// protoc v3.17.3
// source: pkg/labeler/labeler.proto
// source: labeler.proto
package labeler
import (
context "context"
proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
@ -39,6 +40,10 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type SetLabelsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@ -52,7 +57,7 @@ type SetLabelsRequest struct {
func (x *SetLabelsRequest) Reset() {
*x = SetLabelsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_pkg_labeler_labeler_proto_msgTypes[0]
mi := &file_labeler_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -65,7 +70,7 @@ func (x *SetLabelsRequest) String() string {
func (*SetLabelsRequest) ProtoMessage() {}
func (x *SetLabelsRequest) ProtoReflect() protoreflect.Message {
mi := &file_pkg_labeler_labeler_proto_msgTypes[0]
mi := &file_labeler_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -78,7 +83,7 @@ func (x *SetLabelsRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use SetLabelsRequest.ProtoReflect.Descriptor instead.
func (*SetLabelsRequest) Descriptor() ([]byte, []int) {
return file_pkg_labeler_labeler_proto_rawDescGZIP(), []int{0}
return file_labeler_proto_rawDescGZIP(), []int{0}
}
func (x *SetLabelsRequest) GetNfdVersion() string {
@ -111,7 +116,7 @@ type SetLabelsReply struct {
func (x *SetLabelsReply) Reset() {
*x = SetLabelsReply{}
if protoimpl.UnsafeEnabled {
mi := &file_pkg_labeler_labeler_proto_msgTypes[1]
mi := &file_labeler_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -124,7 +129,7 @@ func (x *SetLabelsReply) String() string {
func (*SetLabelsReply) ProtoMessage() {}
func (x *SetLabelsReply) ProtoReflect() protoreflect.Message {
mi := &file_pkg_labeler_labeler_proto_msgTypes[1]
mi := &file_labeler_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -137,58 +142,57 @@ func (x *SetLabelsReply) ProtoReflect() protoreflect.Message {
// Deprecated: Use SetLabelsReply.ProtoReflect.Descriptor instead.
func (*SetLabelsReply) Descriptor() ([]byte, []int) {
return file_pkg_labeler_labeler_proto_rawDescGZIP(), []int{1}
return file_labeler_proto_rawDescGZIP(), []int{1}
}
var File_pkg_labeler_labeler_proto protoreflect.FileDescriptor
var File_labeler_proto protoreflect.FileDescriptor
var file_pkg_labeler_labeler_proto_rawDesc = []byte{
0x0a, 0x19, 0x70, 0x6b, 0x67, 0x2f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x65, 0x72, 0x2f, 0x6c, 0x61,
0x62, 0x65, 0x6c, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x6c, 0x61, 0x62,
0x65, 0x6c, 0x65, 0x72, 0x22, 0xca, 0x01, 0x0a, 0x10, 0x53, 0x65, 0x74, 0x4c, 0x61, 0x62, 0x65,
0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x66, 0x64,
0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a,
0x6e, 0x66, 0x64, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x6f,
0x64, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e,
0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c,
0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x65,
0x72, 0x2e, 0x53, 0x65, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06,
0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73,
0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38,
0x01, 0x22, 0x10, 0x0a, 0x0e, 0x53, 0x65, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52, 0x65,
0x70, 0x6c, 0x79, 0x32, 0x4c, 0x0a, 0x07, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x65, 0x72, 0x12, 0x41,
0x0a, 0x09, 0x53, 0x65, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x19, 0x2e, 0x6c, 0x61,
var file_labeler_proto_rawDesc = []byte{
0x0a, 0x0d, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
0x07, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x65, 0x72, 0x22, 0xca, 0x01, 0x0a, 0x10, 0x53, 0x65, 0x74,
0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a,
0x0b, 0x6e, 0x66, 0x64, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x0a, 0x6e, 0x66, 0x64, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1b,
0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x06, 0x6c,
0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6c, 0x61,
0x62, 0x65, 0x6c, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x65, 0x72,
0x2e, 0x53, 0x65, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22,
0x00, 0x42, 0x30, 0x5a, 0x2e, 0x73, 0x69, 0x67, 0x73, 0x2e, 0x6b, 0x38, 0x73, 0x2e, 0x69, 0x6f,
0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x2d, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x2d, 0x64, 0x69,
0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x6c, 0x61, 0x62, 0x65,
0x6c, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74,
0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61,
0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x10, 0x0a, 0x0e, 0x53, 0x65, 0x74, 0x4c, 0x61, 0x62, 0x65,
0x6c, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x32, 0x4c, 0x0a, 0x07, 0x4c, 0x61, 0x62, 0x65, 0x6c,
0x65, 0x72, 0x12, 0x41, 0x0a, 0x09, 0x53, 0x65, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12,
0x19, 0x2e, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x74, 0x4c, 0x61, 0x62,
0x65, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x6c, 0x61, 0x62,
0x65, 0x6c, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52, 0x65,
0x70, 0x6c, 0x79, 0x22, 0x00, 0x42, 0x30, 0x5a, 0x2e, 0x73, 0x69, 0x67, 0x73, 0x2e, 0x6b, 0x38,
0x73, 0x2e, 0x69, 0x6f, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x2d, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72,
0x65, 0x2d, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x70, 0x6b, 0x67, 0x2f,
0x6c, 0x61, 0x62, 0x65, 0x6c, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_pkg_labeler_labeler_proto_rawDescOnce sync.Once
file_pkg_labeler_labeler_proto_rawDescData = file_pkg_labeler_labeler_proto_rawDesc
file_labeler_proto_rawDescOnce sync.Once
file_labeler_proto_rawDescData = file_labeler_proto_rawDesc
)
func file_pkg_labeler_labeler_proto_rawDescGZIP() []byte {
file_pkg_labeler_labeler_proto_rawDescOnce.Do(func() {
file_pkg_labeler_labeler_proto_rawDescData = protoimpl.X.CompressGZIP(file_pkg_labeler_labeler_proto_rawDescData)
func file_labeler_proto_rawDescGZIP() []byte {
file_labeler_proto_rawDescOnce.Do(func() {
file_labeler_proto_rawDescData = protoimpl.X.CompressGZIP(file_labeler_proto_rawDescData)
})
return file_pkg_labeler_labeler_proto_rawDescData
return file_labeler_proto_rawDescData
}
var file_pkg_labeler_labeler_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_pkg_labeler_labeler_proto_goTypes = []interface{}{
var file_labeler_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_labeler_proto_goTypes = []interface{}{
(*SetLabelsRequest)(nil), // 0: labeler.SetLabelsRequest
(*SetLabelsReply)(nil), // 1: labeler.SetLabelsReply
nil, // 2: labeler.SetLabelsRequest.LabelsEntry
}
var file_pkg_labeler_labeler_proto_depIdxs = []int32{
var file_labeler_proto_depIdxs = []int32{
2, // 0: labeler.SetLabelsRequest.labels:type_name -> labeler.SetLabelsRequest.LabelsEntry
0, // 1: labeler.Labeler.SetLabels:input_type -> labeler.SetLabelsRequest
1, // 2: labeler.Labeler.SetLabels:output_type -> labeler.SetLabelsReply
@ -199,13 +203,13 @@ var file_pkg_labeler_labeler_proto_depIdxs = []int32{
0, // [0:1] is the sub-list for field type_name
}
func init() { file_pkg_labeler_labeler_proto_init() }
func file_pkg_labeler_labeler_proto_init() {
if File_pkg_labeler_labeler_proto != nil {
func init() { file_labeler_proto_init() }
func file_labeler_proto_init() {
if File_labeler_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_pkg_labeler_labeler_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
file_labeler_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SetLabelsRequest); i {
case 0:
return &v.state
@ -217,7 +221,7 @@ func file_pkg_labeler_labeler_proto_init() {
return nil
}
}
file_pkg_labeler_labeler_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
file_labeler_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SetLabelsReply); i {
case 0:
return &v.state
@ -234,20 +238,20 @@ func file_pkg_labeler_labeler_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_pkg_labeler_labeler_proto_rawDesc,
RawDescriptor: file_labeler_proto_rawDesc,
NumEnums: 0,
NumMessages: 3,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_pkg_labeler_labeler_proto_goTypes,
DependencyIndexes: file_pkg_labeler_labeler_proto_depIdxs,
MessageInfos: file_pkg_labeler_labeler_proto_msgTypes,
GoTypes: file_labeler_proto_goTypes,
DependencyIndexes: file_labeler_proto_depIdxs,
MessageInfos: file_labeler_proto_msgTypes,
}.Build()
File_pkg_labeler_labeler_proto = out.File
file_pkg_labeler_labeler_proto_rawDesc = nil
file_pkg_labeler_labeler_proto_goTypes = nil
file_pkg_labeler_labeler_proto_depIdxs = nil
File_labeler_proto = out.File
file_labeler_proto_rawDesc = nil
file_labeler_proto_goTypes = nil
file_labeler_proto_depIdxs = nil
}
// Reference imports to suppress errors if they are not otherwise used.
@ -327,5 +331,5 @@ var _Labeler_serviceDesc = grpc.ServiceDesc{
},
},
Streams: []grpc.StreamDesc{},
Metadata: "pkg/labeler/labeler.proto",
Metadata: "labeler.proto",
}

View file

@ -1,7 +1,5 @@
// Code generated by mockery v1.0.0. DO NOT EDIT.
// Re-generate by running 'make mock'
package labeler
import (

View file

@ -0,0 +1,20 @@
/*
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.
*/
package topologyupdater
//go:generate protoc --go_opt=paths=source_relative --go_out=plugins=grpc:. -I . -I ../../vendor/ topology-updater.proto
//go:generate mockery --name=NodeTopologyClient --inpkg

View file

@ -1,7 +1,5 @@
// Code generated by mockery v1.0.0. DO NOT EDIT.
// Re-generate by running 'make mock'
package topologyupdater
import (

View file

@ -17,7 +17,7 @@
// versions:
// protoc-gen-go v1.23.0
// protoc v3.17.3
// source: pkg/topologyupdater/topology-updater.proto
// source: topology-updater.proto
package topologyupdater
@ -59,7 +59,7 @@ type NodeTopologyRequest struct {
func (x *NodeTopologyRequest) Reset() {
*x = NodeTopologyRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_pkg_topologyupdater_topology_updater_proto_msgTypes[0]
mi := &file_topology_updater_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -72,7 +72,7 @@ func (x *NodeTopologyRequest) String() string {
func (*NodeTopologyRequest) ProtoMessage() {}
func (x *NodeTopologyRequest) ProtoReflect() protoreflect.Message {
mi := &file_pkg_topologyupdater_topology_updater_proto_msgTypes[0]
mi := &file_topology_updater_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -85,7 +85,7 @@ func (x *NodeTopologyRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use NodeTopologyRequest.ProtoReflect.Descriptor instead.
func (*NodeTopologyRequest) Descriptor() ([]byte, []int) {
return file_pkg_topologyupdater_topology_updater_proto_rawDescGZIP(), []int{0}
return file_topology_updater_proto_rawDescGZIP(), []int{0}
}
func (x *NodeTopologyRequest) GetNfdVersion() string {
@ -125,7 +125,7 @@ type NodeTopologyResponse struct {
func (x *NodeTopologyResponse) Reset() {
*x = NodeTopologyResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_pkg_topologyupdater_topology_updater_proto_msgTypes[1]
mi := &file_topology_updater_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -138,7 +138,7 @@ func (x *NodeTopologyResponse) String() string {
func (*NodeTopologyResponse) ProtoMessage() {}
func (x *NodeTopologyResponse) ProtoReflect() protoreflect.Message {
mi := &file_pkg_topologyupdater_topology_updater_proto_msgTypes[1]
mi := &file_topology_updater_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -151,67 +151,66 @@ func (x *NodeTopologyResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use NodeTopologyResponse.ProtoReflect.Descriptor instead.
func (*NodeTopologyResponse) Descriptor() ([]byte, []int) {
return file_pkg_topologyupdater_topology_updater_proto_rawDescGZIP(), []int{1}
return file_topology_updater_proto_rawDescGZIP(), []int{1}
}
var File_pkg_topologyupdater_topology_updater_proto protoreflect.FileDescriptor
var File_topology_updater_proto protoreflect.FileDescriptor
var file_pkg_topologyupdater_topology_updater_proto_rawDesc = []byte{
0x0a, 0x2a, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x75, 0x70,
0x64, 0x61, 0x74, 0x65, 0x72, 0x2f, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x2d, 0x75,
0x70, 0x64, 0x61, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x74, 0x6f,
0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x72, 0x1a, 0x66, 0x67,
0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x38, 0x73, 0x74, 0x6f, 0x70,
0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x61, 0x77, 0x61, 0x72, 0x65, 0x73, 0x63, 0x68, 0x65, 0x64, 0x77,
0x67, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x74, 0x6f,
0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x2d, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61,
0x70, 0x69, 0x73, 0x2f, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x2f, 0x76, 0x31, 0x61,
0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa6, 0x01, 0x0a, 0x13, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x6f,
0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a,
0x0b, 0x6e, 0x66, 0x64, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x0a, 0x6e, 0x66, 0x64, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1b,
0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x74,
0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73,
0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79,
0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x05, 0x7a, 0x6f, 0x6e, 0x65,
0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68,
0x61, 0x31, 0x2e, 0x5a, 0x6f, 0x6e, 0x65, 0x52, 0x05, 0x7a, 0x6f, 0x6e, 0x65, 0x73, 0x22, 0x16,
0x0a, 0x14, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x71, 0x0a, 0x0c, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x6f,
0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x12, 0x61, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
0x4e, 0x6f, 0x64, 0x65, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x12, 0x24, 0x2e, 0x74,
0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x72, 0x2e, 0x4e,
0x6f, 0x64, 0x65, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x25, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x75, 0x70, 0x64,
0x61, 0x74, 0x65, 0x72, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67,
0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x38, 0x5a, 0x36, 0x73, 0x69, 0x67,
0x73, 0x2e, 0x6b, 0x38, 0x73, 0x2e, 0x69, 0x6f, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x2d, 0x66, 0x65,
0x61, 0x74, 0x75, 0x72, 0x65, 0x2d, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f,
0x70, 0x6b, 0x67, 0x2f, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x75, 0x70, 0x64, 0x61,
0x74, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
var file_topology_updater_proto_rawDesc = []byte{
0x0a, 0x16, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x2d, 0x75, 0x70, 0x64, 0x61, 0x74,
0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f,
0x67, 0x79, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x72, 0x1a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75,
0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x38, 0x73, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67,
0x79, 0x61, 0x77, 0x61, 0x72, 0x65, 0x73, 0x63, 0x68, 0x65, 0x64, 0x77, 0x67, 0x2f, 0x6e, 0x6f,
0x64, 0x65, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f,
0x67, 0x79, 0x2d, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f,
0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x22, 0xa6, 0x01, 0x0a, 0x13, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f,
0x67, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x66, 0x64,
0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a,
0x6e, 0x66, 0x64, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x6f,
0x64, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e,
0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x6f, 0x70, 0x6f, 0x6c,
0x6f, 0x67, 0x79, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03,
0x28, 0x09, 0x52, 0x10, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x50, 0x6f, 0x6c, 0x69,
0x63, 0x69, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x05, 0x7a, 0x6f, 0x6e, 0x65, 0x73, 0x18, 0x04, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x5a,
0x6f, 0x6e, 0x65, 0x52, 0x05, 0x7a, 0x6f, 0x6e, 0x65, 0x73, 0x22, 0x16, 0x0a, 0x14, 0x4e, 0x6f,
0x64, 0x65, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x32, 0x71, 0x0a, 0x0c, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f,
0x67, 0x79, 0x12, 0x61, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65,
0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x12, 0x24, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x6c,
0x6f, 0x67, 0x79, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x72, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x54,
0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25,
0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x72,
0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x38, 0x5a, 0x36, 0x73, 0x69, 0x67, 0x73, 0x2e, 0x6b, 0x38,
0x73, 0x2e, 0x69, 0x6f, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x2d, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72,
0x65, 0x2d, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x70, 0x6b, 0x67, 0x2f,
0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x72, 0x62,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_pkg_topologyupdater_topology_updater_proto_rawDescOnce sync.Once
file_pkg_topologyupdater_topology_updater_proto_rawDescData = file_pkg_topologyupdater_topology_updater_proto_rawDesc
file_topology_updater_proto_rawDescOnce sync.Once
file_topology_updater_proto_rawDescData = file_topology_updater_proto_rawDesc
)
func file_pkg_topologyupdater_topology_updater_proto_rawDescGZIP() []byte {
file_pkg_topologyupdater_topology_updater_proto_rawDescOnce.Do(func() {
file_pkg_topologyupdater_topology_updater_proto_rawDescData = protoimpl.X.CompressGZIP(file_pkg_topologyupdater_topology_updater_proto_rawDescData)
func file_topology_updater_proto_rawDescGZIP() []byte {
file_topology_updater_proto_rawDescOnce.Do(func() {
file_topology_updater_proto_rawDescData = protoimpl.X.CompressGZIP(file_topology_updater_proto_rawDescData)
})
return file_pkg_topologyupdater_topology_updater_proto_rawDescData
return file_topology_updater_proto_rawDescData
}
var file_pkg_topologyupdater_topology_updater_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_pkg_topologyupdater_topology_updater_proto_goTypes = []interface{}{
var file_topology_updater_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_topology_updater_proto_goTypes = []interface{}{
(*NodeTopologyRequest)(nil), // 0: topologyupdater.NodeTopologyRequest
(*NodeTopologyResponse)(nil), // 1: topologyupdater.NodeTopologyResponse
(*v1alpha1.Zone)(nil), // 2: v1alpha1.Zone
}
var file_pkg_topologyupdater_topology_updater_proto_depIdxs = []int32{
var file_topology_updater_proto_depIdxs = []int32{
2, // 0: topologyupdater.NodeTopologyRequest.zones:type_name -> v1alpha1.Zone
0, // 1: topologyupdater.NodeTopology.UpdateNodeTopology:input_type -> topologyupdater.NodeTopologyRequest
1, // 2: topologyupdater.NodeTopology.UpdateNodeTopology:output_type -> topologyupdater.NodeTopologyResponse
@ -222,13 +221,13 @@ var file_pkg_topologyupdater_topology_updater_proto_depIdxs = []int32{
0, // [0:1] is the sub-list for field type_name
}
func init() { file_pkg_topologyupdater_topology_updater_proto_init() }
func file_pkg_topologyupdater_topology_updater_proto_init() {
if File_pkg_topologyupdater_topology_updater_proto != nil {
func init() { file_topology_updater_proto_init() }
func file_topology_updater_proto_init() {
if File_topology_updater_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_pkg_topologyupdater_topology_updater_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
file_topology_updater_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NodeTopologyRequest); i {
case 0:
return &v.state
@ -240,7 +239,7 @@ func file_pkg_topologyupdater_topology_updater_proto_init() {
return nil
}
}
file_pkg_topologyupdater_topology_updater_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
file_topology_updater_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NodeTopologyResponse); i {
case 0:
return &v.state
@ -257,20 +256,20 @@ func file_pkg_topologyupdater_topology_updater_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_pkg_topologyupdater_topology_updater_proto_rawDesc,
RawDescriptor: file_topology_updater_proto_rawDesc,
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_pkg_topologyupdater_topology_updater_proto_goTypes,
DependencyIndexes: file_pkg_topologyupdater_topology_updater_proto_depIdxs,
MessageInfos: file_pkg_topologyupdater_topology_updater_proto_msgTypes,
GoTypes: file_topology_updater_proto_goTypes,
DependencyIndexes: file_topology_updater_proto_depIdxs,
MessageInfos: file_topology_updater_proto_msgTypes,
}.Build()
File_pkg_topologyupdater_topology_updater_proto = out.File
file_pkg_topologyupdater_topology_updater_proto_rawDesc = nil
file_pkg_topologyupdater_topology_updater_proto_goTypes = nil
file_pkg_topologyupdater_topology_updater_proto_depIdxs = nil
File_topology_updater_proto = out.File
file_topology_updater_proto_rawDesc = nil
file_topology_updater_proto_goTypes = nil
file_topology_updater_proto_depIdxs = nil
}
// Reference imports to suppress errors if they are not otherwise used.
@ -350,5 +349,5 @@ var _NodeTopology_serviceDesc = grpc.ServiceDesc{
},
},
Streams: []grpc.StreamDesc{},
Metadata: "pkg/topologyupdater/topology-updater.proto",
Metadata: "topology-updater.proto",
}

View file

@ -1,7 +1,5 @@
// Code generated by mockery v1.0.0. DO NOT EDIT.
// Re-generate by running 'make mock'
package source
import mock "github.com/stretchr/testify/mock"

View file

@ -16,6 +16,8 @@ limitations under the License.
package source
//go:generate mockery --name=LabelSource --inpkg
import (
"fmt"