diff --git a/go.mod b/go.mod index 892a8d1..2082ef2 100644 --- a/go.mod +++ b/go.mod @@ -13,11 +13,11 @@ require ( go.uber.org/goleak v1.3.0 google.golang.org/grpc v1.72.1 google.golang.org/protobuf v1.36.5 - k8s.io/api v0.0.0-20250724024528-2596a6b386e2 + k8s.io/api v0.0.0-20250724104226-1560b8c850a7 k8s.io/apimachinery v0.0.0-20250723005633-58c4eb072ebf - k8s.io/apiserver v0.0.0-20250723185939-b6a8cfb34902 - k8s.io/client-go v0.0.0-20250724024901-5f1f878e5cd4 - k8s.io/component-base v0.0.0-20250717172125-4e07767df717 + k8s.io/apiserver v0.0.0-20250724150558-4f018447f7b6 + k8s.io/client-go v0.0.0-20250724184918-f4919f808e1e + k8s.io/component-base v0.0.0-20250724065244-07ee182722a1 k8s.io/cri-api v0.0.0-20250723020434-76b7537840fa k8s.io/klog/v2 v2.130.1 k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 diff --git a/go.sum b/go.sum index d58b744..4b64ca8 100644 --- a/go.sum +++ b/go.sum @@ -166,16 +166,16 @@ gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -k8s.io/api v0.0.0-20250724024528-2596a6b386e2 h1:aeFV4AlRTSANFYdVlUVMDOXwkFXNkiIT9Lmif8U+MK4= -k8s.io/api v0.0.0-20250724024528-2596a6b386e2/go.mod h1:70o+sJgHYrO2nPMKeEsmpidpEUMobuxHMhjK/ud9+og= +k8s.io/api v0.0.0-20250724104226-1560b8c850a7 h1:Y5FVeGr2IQ3fbv6GeQAeiZKIyBwxyr7Nv0tWJog9OEo= +k8s.io/api v0.0.0-20250724104226-1560b8c850a7/go.mod h1:70o+sJgHYrO2nPMKeEsmpidpEUMobuxHMhjK/ud9+og= k8s.io/apimachinery v0.0.0-20250723005633-58c4eb072ebf h1:R1l0xAevbhH2Bg0iJuabo8/i9m31D1ehh2ZJPFKh9bc= k8s.io/apimachinery v0.0.0-20250723005633-58c4eb072ebf/go.mod h1:v1p1Jsze3IHLy5gU17yVqR2qLO7jgYeX6mw3HZy2AEU= -k8s.io/apiserver v0.0.0-20250723185939-b6a8cfb34902 h1:XJwc7NE8YDDeONFiZjfdBWP3b4TH6FV2ipldGMk7Z9Q= -k8s.io/apiserver v0.0.0-20250723185939-b6a8cfb34902/go.mod h1:kI5+6k1Dm7a5KwFpxbz2uNQciSwZye/iiYER/2Dh0k4= -k8s.io/client-go v0.0.0-20250724024901-5f1f878e5cd4 h1:cUaPGCS7dfX5d85Q8ZJBD2rdK5C6tbWEtGFdBcH+bxo= -k8s.io/client-go v0.0.0-20250724024901-5f1f878e5cd4/go.mod h1:kgDY5crqhNpktphA+cjWLcLLjrF5apg7TWTtaVyhUm8= -k8s.io/component-base v0.0.0-20250717172125-4e07767df717 h1:07oqkM0FzuGUw/bJw2rJubzccG7ShpGcTJ7SBDGp5Fc= -k8s.io/component-base v0.0.0-20250717172125-4e07767df717/go.mod h1:/ehREU84M2OxVgU8WfxuUIi4/c5XsT6rIsEGQfhgxEQ= +k8s.io/apiserver v0.0.0-20250724150558-4f018447f7b6 h1:cdX/g0KowsKzVlg2i8zmBgcftXXI9jYySRu/EnQpgbI= +k8s.io/apiserver v0.0.0-20250724150558-4f018447f7b6/go.mod h1:Mf5ULoqgHWn6gSRBQ3pCj5tpW2wCot/XzgJ5zRAI38Q= +k8s.io/client-go v0.0.0-20250724184918-f4919f808e1e h1:Mx4XD6RjgDFsahWjFc3cLL3cUy4EobpMCcCA+zAYVh0= +k8s.io/client-go v0.0.0-20250724184918-f4919f808e1e/go.mod h1:cgK+6wG3u4eub4z04TjSa9Y2WD320ZageTzIr5+E5Cg= +k8s.io/component-base v0.0.0-20250724065244-07ee182722a1 h1:OSPZY89+U2JKPaQnluxgzhsbY+L+gG/cxgYVFY5gYA0= +k8s.io/component-base v0.0.0-20250724065244-07ee182722a1/go.mod h1:w6VkDvQYhgRcM0VZp+pAMPfhFPflGqAAik6tDGgIyq0= k8s.io/cri-api v0.0.0-20250723020434-76b7537840fa h1:L4yvqLnh4ve8h+JacYscIkdWaXglU3n7xFOY5sce4E0= k8s.io/cri-api v0.0.0-20250723020434-76b7537840fa/go.mod h1:4qVUjidMg7/Z9YGZpqIDygbkPWkg3mkS1PvOx/kpHTE= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= diff --git a/pkg/apis/pluginregistration/v1/api.pb.go b/pkg/apis/pluginregistration/v1/api.pb.go index ecfc843..3c225cd 100644 --- a/pkg/apis/pluginregistration/v1/api.pb.go +++ b/pkg/apis/pluginregistration/v1/api.pb.go @@ -14,39 +14,34 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: api.proto +// To regenerate api.pb.go run `hack/update-codegen.sh protobindings` + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.4 +// protoc v4.23.4 +// source: staging/src/k8s.io/kubelet/pkg/apis/pluginregistration/v1/api.proto package v1 import ( - context "context" - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" - strings "strings" + sync "sync" + unsafe "unsafe" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) // PluginInfo is the message sent from a plugin to the Kubelet pluginwatcher for plugin registration type PluginInfo struct { + state protoimpl.MessageState `protogen:"open.v1"` // Type of the Plugin. CSIPlugin or DevicePlugin Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` // Plugin name that uniquely identifies the plugin for the given plugin type. @@ -66,1083 +61,293 @@ type PluginInfo struct { // The Kubelet component communicating with the plugin should be able // to choose any preferred version from this list, or returns an error // if none of the listed versions is supported. - SupportedVersions []string `protobuf:"bytes,4,rep,name=supported_versions,json=supportedVersions,proto3" json:"supported_versions,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` + SupportedVersions []string `protobuf:"bytes,4,rep,name=supported_versions,json=supportedVersions,proto3" json:"supported_versions,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PluginInfo) Reset() { + *x = PluginInfo{} + mi := &file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1_api_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PluginInfo) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *PluginInfo) Reset() { *m = PluginInfo{} } func (*PluginInfo) ProtoMessage() {} -func (*PluginInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{0} -} -func (m *PluginInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PluginInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PluginInfo.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + +func (x *PluginInfo) ProtoReflect() protoreflect.Message { + mi := &file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1_api_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil + return ms } -} -func (m *PluginInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_PluginInfo.Merge(m, src) -} -func (m *PluginInfo) XXX_Size() int { - return m.Size() -} -func (m *PluginInfo) XXX_DiscardUnknown() { - xxx_messageInfo_PluginInfo.DiscardUnknown(m) + return mi.MessageOf(x) } -var xxx_messageInfo_PluginInfo proto.InternalMessageInfo +// Deprecated: Use PluginInfo.ProtoReflect.Descriptor instead. +func (*PluginInfo) Descriptor() ([]byte, []int) { + return file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1_api_proto_rawDescGZIP(), []int{0} +} -func (m *PluginInfo) GetType() string { - if m != nil { - return m.Type +func (x *PluginInfo) GetType() string { + if x != nil { + return x.Type } return "" } -func (m *PluginInfo) GetName() string { - if m != nil { - return m.Name +func (x *PluginInfo) GetName() string { + if x != nil { + return x.Name } return "" } -func (m *PluginInfo) GetEndpoint() string { - if m != nil { - return m.Endpoint +func (x *PluginInfo) GetEndpoint() string { + if x != nil { + return x.Endpoint } return "" } -func (m *PluginInfo) GetSupportedVersions() []string { - if m != nil { - return m.SupportedVersions +func (x *PluginInfo) GetSupportedVersions() []string { + if x != nil { + return x.SupportedVersions } return nil } // RegistrationStatus is the message sent from Kubelet pluginwatcher to the plugin for notification on registration status type RegistrationStatus struct { + state protoimpl.MessageState `protogen:"open.v1"` // True if plugin gets registered successfully at Kubelet PluginRegistered bool `protobuf:"varint,1,opt,name=plugin_registered,json=pluginRegistered,proto3" json:"plugin_registered,omitempty"` // Error message in case plugin fails to register, empty string otherwise - Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` + Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RegistrationStatus) Reset() { + *x = RegistrationStatus{} + mi := &file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1_api_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RegistrationStatus) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *RegistrationStatus) Reset() { *m = RegistrationStatus{} } func (*RegistrationStatus) ProtoMessage() {} -func (*RegistrationStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{1} -} -func (m *RegistrationStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RegistrationStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RegistrationStatus.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + +func (x *RegistrationStatus) ProtoReflect() protoreflect.Message { + mi := &file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1_api_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil + return ms } -} -func (m *RegistrationStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_RegistrationStatus.Merge(m, src) -} -func (m *RegistrationStatus) XXX_Size() int { - return m.Size() -} -func (m *RegistrationStatus) XXX_DiscardUnknown() { - xxx_messageInfo_RegistrationStatus.DiscardUnknown(m) + return mi.MessageOf(x) } -var xxx_messageInfo_RegistrationStatus proto.InternalMessageInfo +// Deprecated: Use RegistrationStatus.ProtoReflect.Descriptor instead. +func (*RegistrationStatus) Descriptor() ([]byte, []int) { + return file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1_api_proto_rawDescGZIP(), []int{1} +} -func (m *RegistrationStatus) GetPluginRegistered() bool { - if m != nil { - return m.PluginRegistered +func (x *RegistrationStatus) GetPluginRegistered() bool { + if x != nil { + return x.PluginRegistered } return false } -func (m *RegistrationStatus) GetError() string { - if m != nil { - return m.Error +func (x *RegistrationStatus) GetError() string { + if x != nil { + return x.Error } return "" } // RegistrationStatusResponse is sent by plugin to kubelet in response to RegistrationStatus RPC type RegistrationStatusResponse struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RegistrationStatusResponse) Reset() { + *x = RegistrationStatusResponse{} + mi := &file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1_api_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RegistrationStatusResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *RegistrationStatusResponse) Reset() { *m = RegistrationStatusResponse{} } func (*RegistrationStatusResponse) ProtoMessage() {} -func (*RegistrationStatusResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{2} -} -func (m *RegistrationStatusResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RegistrationStatusResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RegistrationStatusResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + +func (x *RegistrationStatusResponse) ProtoReflect() protoreflect.Message { + mi := &file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1_api_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil + return ms } -} -func (m *RegistrationStatusResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_RegistrationStatusResponse.Merge(m, src) -} -func (m *RegistrationStatusResponse) XXX_Size() int { - return m.Size() -} -func (m *RegistrationStatusResponse) XXX_DiscardUnknown() { - xxx_messageInfo_RegistrationStatusResponse.DiscardUnknown(m) + return mi.MessageOf(x) } -var xxx_messageInfo_RegistrationStatusResponse proto.InternalMessageInfo +// Deprecated: Use RegistrationStatusResponse.ProtoReflect.Descriptor instead. +func (*RegistrationStatusResponse) Descriptor() ([]byte, []int) { + return file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1_api_proto_rawDescGZIP(), []int{2} +} // InfoRequest is the empty request message from Kubelet type InfoRequest struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *InfoRequest) Reset() { + *x = InfoRequest{} + mi := &file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1_api_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *InfoRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *InfoRequest) Reset() { *m = InfoRequest{} } func (*InfoRequest) ProtoMessage() {} + +func (x *InfoRequest) ProtoReflect() protoreflect.Message { + mi := &file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1_api_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InfoRequest.ProtoReflect.Descriptor instead. func (*InfoRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{3} -} -func (m *InfoRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *InfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_InfoRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *InfoRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_InfoRequest.Merge(m, src) -} -func (m *InfoRequest) XXX_Size() int { - return m.Size() -} -func (m *InfoRequest) XXX_DiscardUnknown() { - xxx_messageInfo_InfoRequest.DiscardUnknown(m) + return file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1_api_proto_rawDescGZIP(), []int{3} } -var xxx_messageInfo_InfoRequest proto.InternalMessageInfo +var File_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1_api_proto protoreflect.FileDescriptor -func init() { - proto.RegisterType((*PluginInfo)(nil), "pluginregistration.PluginInfo") - proto.RegisterType((*RegistrationStatus)(nil), "pluginregistration.RegistrationStatus") - proto.RegisterType((*RegistrationStatusResponse)(nil), "pluginregistration.RegistrationStatusResponse") - proto.RegisterType((*InfoRequest)(nil), "pluginregistration.InfoRequest") -} - -func init() { proto.RegisterFile("api.proto", fileDescriptor_00212fb1f9d3bf1c) } - -var fileDescriptor_00212fb1f9d3bf1c = []byte{ - // 365 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x52, 0xc1, 0x4a, 0xeb, 0x40, - 0x14, 0xcd, 0xbc, 0xf6, 0xbd, 0xd7, 0x8e, 0x0a, 0x76, 0x70, 0x11, 0x82, 0x8c, 0x25, 0x0b, 0x29, - 0x48, 0x13, 0xd4, 0x8d, 0x6b, 0x37, 0x22, 0x8a, 0x48, 0x04, 0x05, 0x37, 0x25, 0xb1, 0xb7, 0x71, - 0x68, 0x3b, 0x33, 0xce, 0x4c, 0x0a, 0x5d, 0xe9, 0x27, 0xf8, 0x59, 0x5d, 0x8a, 0x2b, 0x97, 0x36, - 0xfe, 0x88, 0x74, 0x52, 0x62, 0x21, 0x5d, 0xb8, 0xbb, 0xe7, 0xdc, 0x73, 0xef, 0xdc, 0x73, 0x18, - 0xdc, 0x8c, 0x25, 0x0b, 0xa4, 0x12, 0x46, 0x10, 0x22, 0x47, 0x59, 0xca, 0xb8, 0x82, 0x94, 0x69, - 0xa3, 0x62, 0xc3, 0x04, 0xf7, 0xba, 0x29, 0x33, 0x8f, 0x59, 0x12, 0x3c, 0x88, 0x71, 0x98, 0x8a, - 0x54, 0x84, 0x56, 0x9a, 0x64, 0x03, 0x8b, 0x2c, 0xb0, 0x55, 0xb1, 0xc2, 0x7f, 0xc6, 0xf8, 0xda, - 0x2e, 0x39, 0xe7, 0x03, 0x41, 0x08, 0xae, 0x9b, 0xa9, 0x04, 0x17, 0xb5, 0x51, 0xa7, 0x19, 0xd9, - 0x7a, 0xc1, 0xf1, 0x78, 0x0c, 0xee, 0x9f, 0x82, 0x5b, 0xd4, 0xc4, 0xc3, 0x0d, 0xe0, 0x7d, 0x29, - 0x18, 0x37, 0x6e, 0xcd, 0xf2, 0x25, 0x26, 0x5d, 0x4c, 0x74, 0x26, 0xa5, 0x50, 0x06, 0xfa, 0xbd, - 0x09, 0x28, 0xcd, 0x04, 0xd7, 0x6e, 0xbd, 0x5d, 0xeb, 0x34, 0xa3, 0x56, 0xd9, 0xb9, 0x5d, 0x36, - 0xfc, 0x3b, 0x4c, 0xa2, 0x95, 0xfb, 0x6f, 0x4c, 0x6c, 0x32, 0x4d, 0x0e, 0x70, 0xab, 0xf0, 0xd6, - 0x2b, 0xcc, 0x81, 0x82, 0xbe, 0xbd, 0xaa, 0x11, 0x6d, 0x17, 0x8d, 0xa8, 0xe4, 0xc9, 0x0e, 0xfe, - 0x0b, 0x4a, 0x09, 0xb5, 0x3c, 0xb1, 0x00, 0xfe, 0x2e, 0xf6, 0xaa, 0x8b, 0x23, 0xd0, 0x52, 0x70, - 0x0d, 0xfe, 0x16, 0xde, 0x58, 0x38, 0x8e, 0xe0, 0x29, 0x03, 0x6d, 0x8e, 0xde, 0x11, 0xde, 0x5c, - 0x55, 0x93, 0x4b, 0xfc, 0xff, 0x0c, 0x8c, 0x0d, 0x65, 0x2f, 0xa8, 0xc6, 0x1c, 0xac, 0x0c, 0x7b, - 0x74, 0x9d, 0xe0, 0x27, 0x55, 0xdf, 0x21, 0x06, 0xbb, 0x57, 0xc2, 0xb0, 0xc1, 0x74, 0x8d, 0xd5, - 0xfd, 0x75, 0xd3, 0x55, 0x9d, 0x17, 0xfc, 0x4e, 0x57, 0x3a, 0x74, 0x4e, 0x2f, 0x66, 0x73, 0x8a, - 0x3e, 0xe6, 0xd4, 0x79, 0xc9, 0x29, 0x9a, 0xe5, 0x14, 0xbd, 0xe5, 0x14, 0x7d, 0xe6, 0x14, 0xbd, - 0x7e, 0x51, 0xe7, 0xbe, 0x3b, 0x3c, 0xd1, 0x01, 0x13, 0xe1, 0x30, 0x4b, 0x60, 0x04, 0x26, 0x94, - 0xc3, 0x34, 0x8c, 0x25, 0xd3, 0x61, 0xf5, 0x99, 0x70, 0x72, 0x98, 0xfc, 0xb3, 0xff, 0xe5, 0xf8, - 0x3b, 0x00, 0x00, 0xff, 0xff, 0xcc, 0x5f, 0xd4, 0xb2, 0x7f, 0x02, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// RegistrationClient is the client API for Registration service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type RegistrationClient interface { - GetInfo(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*PluginInfo, error) - NotifyRegistrationStatus(ctx context.Context, in *RegistrationStatus, opts ...grpc.CallOption) (*RegistrationStatusResponse, error) -} - -type registrationClient struct { - cc *grpc.ClientConn -} - -func NewRegistrationClient(cc *grpc.ClientConn) RegistrationClient { - return ®istrationClient{cc} -} - -func (c *registrationClient) GetInfo(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*PluginInfo, error) { - out := new(PluginInfo) - err := c.cc.Invoke(ctx, "/pluginregistration.Registration/GetInfo", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *registrationClient) NotifyRegistrationStatus(ctx context.Context, in *RegistrationStatus, opts ...grpc.CallOption) (*RegistrationStatusResponse, error) { - out := new(RegistrationStatusResponse) - err := c.cc.Invoke(ctx, "/pluginregistration.Registration/NotifyRegistrationStatus", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// RegistrationServer is the server API for Registration service. -type RegistrationServer interface { - GetInfo(context.Context, *InfoRequest) (*PluginInfo, error) - NotifyRegistrationStatus(context.Context, *RegistrationStatus) (*RegistrationStatusResponse, error) -} - -// UnimplementedRegistrationServer can be embedded to have forward compatible implementations. -type UnimplementedRegistrationServer struct { -} - -func (*UnimplementedRegistrationServer) GetInfo(ctx context.Context, req *InfoRequest) (*PluginInfo, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetInfo not implemented") -} -func (*UnimplementedRegistrationServer) NotifyRegistrationStatus(ctx context.Context, req *RegistrationStatus) (*RegistrationStatusResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method NotifyRegistrationStatus not implemented") -} - -func RegisterRegistrationServer(s *grpc.Server, srv RegistrationServer) { - s.RegisterService(&_Registration_serviceDesc, srv) -} - -func _Registration_GetInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(InfoRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RegistrationServer).GetInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pluginregistration.Registration/GetInfo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RegistrationServer).GetInfo(ctx, req.(*InfoRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Registration_NotifyRegistrationStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RegistrationStatus) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RegistrationServer).NotifyRegistrationStatus(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pluginregistration.Registration/NotifyRegistrationStatus", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RegistrationServer).NotifyRegistrationStatus(ctx, req.(*RegistrationStatus)) - } - return interceptor(ctx, in, info, handler) -} - -var _Registration_serviceDesc = grpc.ServiceDesc{ - ServiceName: "pluginregistration.Registration", - HandlerType: (*RegistrationServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetInfo", - Handler: _Registration_GetInfo_Handler, - }, - { - MethodName: "NotifyRegistrationStatus", - Handler: _Registration_NotifyRegistrationStatus_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "api.proto", -} - -func (m *PluginInfo) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *PluginInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PluginInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.SupportedVersions) > 0 { - for iNdEx := len(m.SupportedVersions) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.SupportedVersions[iNdEx]) - copy(dAtA[i:], m.SupportedVersions[iNdEx]) - i = encodeVarintApi(dAtA, i, uint64(len(m.SupportedVersions[iNdEx]))) - i-- - dAtA[i] = 0x22 - } - } - if len(m.Endpoint) > 0 { - i -= len(m.Endpoint) - copy(dAtA[i:], m.Endpoint) - i = encodeVarintApi(dAtA, i, uint64(len(m.Endpoint))) - i-- - dAtA[i] = 0x1a - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintApi(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x12 - } - if len(m.Type) > 0 { - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintApi(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *RegistrationStatus) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RegistrationStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RegistrationStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Error) > 0 { - i -= len(m.Error) - copy(dAtA[i:], m.Error) - i = encodeVarintApi(dAtA, i, uint64(len(m.Error))) - i-- - dAtA[i] = 0x12 - } - if m.PluginRegistered { - i-- - if m.PluginRegistered { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *RegistrationStatusResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RegistrationStatusResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RegistrationStatusResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *InfoRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *InfoRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *InfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func encodeVarintApi(dAtA []byte, offset int, v uint64) int { - offset -= sovApi(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *PluginInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Type) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) - } - l = len(m.Name) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) - } - l = len(m.Endpoint) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) - } - if len(m.SupportedVersions) > 0 { - for _, s := range m.SupportedVersions { - l = len(s) - n += 1 + l + sovApi(uint64(l)) - } - } - return n -} - -func (m *RegistrationStatus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.PluginRegistered { - n += 2 - } - l = len(m.Error) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) - } - return n -} - -func (m *RegistrationStatusResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *InfoRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func sovApi(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozApi(x uint64) (n int) { - return sovApi(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *PluginInfo) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&PluginInfo{`, - `Type:` + fmt.Sprintf("%v", this.Type) + `,`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Endpoint:` + fmt.Sprintf("%v", this.Endpoint) + `,`, - `SupportedVersions:` + fmt.Sprintf("%v", this.SupportedVersions) + `,`, - `}`, - }, "") - return s -} -func (this *RegistrationStatus) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&RegistrationStatus{`, - `PluginRegistered:` + fmt.Sprintf("%v", this.PluginRegistered) + `,`, - `Error:` + fmt.Sprintf("%v", this.Error) + `,`, - `}`, - }, "") - return s -} -func (this *RegistrationStatusResponse) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&RegistrationStatusResponse{`, - `}`, - }, "") - return s -} -func (this *InfoRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&InfoRequest{`, - `}`, - }, "") - return s -} -func valueToStringApi(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *PluginInfo) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: PluginInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PluginInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthApi - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthApi - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthApi - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthApi - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Endpoint", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthApi - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthApi - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Endpoint = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SupportedVersions", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthApi - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthApi - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SupportedVersions = append(m.SupportedVersions, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipApi(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthApi - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RegistrationStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RegistrationStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RegistrationStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PluginRegistered", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.PluginRegistered = bool(v != 0) - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthApi - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthApi - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Error = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipApi(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthApi - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RegistrationStatusResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RegistrationStatusResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RegistrationStatusResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipApi(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthApi - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *InfoRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: InfoRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: InfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipApi(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthApi - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipApi(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowApi - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowApi - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowApi - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthApi - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupApi - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthApi - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} +var file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1_api_proto_rawDesc = string([]byte{ + 0x0a, 0x43, 0x73, 0x74, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x2f, 0x73, 0x72, 0x63, 0x2f, 0x6b, 0x38, + 0x73, 0x2e, 0x69, 0x6f, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x6c, 0x65, 0x74, 0x2f, 0x70, 0x6b, 0x67, + 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x72, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x72, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x7f, 0x0a, 0x0a, 0x50, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x2d, 0x0a, 0x12, 0x73, + 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, + 0x65, 0x64, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x57, 0x0a, 0x12, 0x52, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x2b, 0x0a, 0x11, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x65, 0x72, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x70, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x12, 0x14, 0x0a, + 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, + 0x72, 0x6f, 0x72, 0x22, 0x1c, 0x0a, 0x1a, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x0d, 0x0a, 0x0b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x32, 0xd2, 0x01, 0x0a, 0x0c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x4c, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1f, 0x2e, 0x70, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, + 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x00, 0x12, + 0x74, 0x0a, 0x18, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x26, 0x2e, 0x70, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x1a, 0x2e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x72, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x2f, 0x5a, 0x2d, 0x6b, 0x38, 0x73, 0x2e, 0x69, 0x6f, 0x2f, + 0x6b, 0x75, 0x62, 0x65, 0x6c, 0x65, 0x74, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x73, + 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +}) var ( - ErrInvalidLengthApi = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowApi = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupApi = fmt.Errorf("proto: unexpected end of group") + file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1_api_proto_rawDescOnce sync.Once + file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1_api_proto_rawDescData []byte ) + +func file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1_api_proto_rawDescGZIP() []byte { + file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1_api_proto_rawDescOnce.Do(func() { + file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1_api_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1_api_proto_rawDesc), len(file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1_api_proto_rawDesc))) + }) + return file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1_api_proto_rawDescData +} + +var file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1_api_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1_api_proto_goTypes = []any{ + (*PluginInfo)(nil), // 0: pluginregistration.PluginInfo + (*RegistrationStatus)(nil), // 1: pluginregistration.RegistrationStatus + (*RegistrationStatusResponse)(nil), // 2: pluginregistration.RegistrationStatusResponse + (*InfoRequest)(nil), // 3: pluginregistration.InfoRequest +} +var file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1_api_proto_depIdxs = []int32{ + 3, // 0: pluginregistration.Registration.GetInfo:input_type -> pluginregistration.InfoRequest + 1, // 1: pluginregistration.Registration.NotifyRegistrationStatus:input_type -> pluginregistration.RegistrationStatus + 0, // 2: pluginregistration.Registration.GetInfo:output_type -> pluginregistration.PluginInfo + 2, // 3: pluginregistration.Registration.NotifyRegistrationStatus:output_type -> pluginregistration.RegistrationStatusResponse + 2, // [2:4] is the sub-list for method output_type + 0, // [0:2] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1_api_proto_init() } +func file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1_api_proto_init() { + if File_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1_api_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1_api_proto_rawDesc), len(file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1_api_proto_rawDesc)), + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1_api_proto_goTypes, + DependencyIndexes: file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1_api_proto_depIdxs, + MessageInfos: file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1_api_proto_msgTypes, + }.Build() + File_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1_api_proto = out.File + file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1_api_proto_goTypes = nil + file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1_api_proto_depIdxs = nil +} diff --git a/pkg/apis/pluginregistration/v1/api.proto b/pkg/apis/pluginregistration/v1/api.proto index 8972e7e..6de6468 100644 --- a/pkg/apis/pluginregistration/v1/api.proto +++ b/pkg/apis/pluginregistration/v1/api.proto @@ -4,16 +4,6 @@ syntax = "proto3"; package pluginregistration; // This should have been v1. option go_package = "k8s.io/kubelet/pkg/apis/pluginregistration/v1"; -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.stringer_all) = true; -option (gogoproto.goproto_getters_all) = true; -option (gogoproto.marshaler_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.goproto_unrecognized_all) = false; - // PluginInfo is the message sent from a plugin to the Kubelet pluginwatcher for plugin registration message PluginInfo { // Type of the Plugin. CSIPlugin or DevicePlugin diff --git a/pkg/apis/pluginregistration/v1/api_grpc.pb.go b/pkg/apis/pluginregistration/v1/api_grpc.pb.go new file mode 100644 index 0000000..678d57c --- /dev/null +++ b/pkg/apis/pluginregistration/v1/api_grpc.pb.go @@ -0,0 +1,181 @@ +/* +Copyright 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. +*/ + +// To regenerate api.pb.go run `hack/update-codegen.sh protobindings` + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc v4.23.4 +// source: staging/src/k8s.io/kubelet/pkg/apis/pluginregistration/v1/api.proto + +package v1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + Registration_GetInfo_FullMethodName = "/pluginregistration.Registration/GetInfo" + Registration_NotifyRegistrationStatus_FullMethodName = "/pluginregistration.Registration/NotifyRegistrationStatus" +) + +// RegistrationClient is the client API for Registration service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Registration is the service advertised by the Plugins. +type RegistrationClient interface { + GetInfo(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*PluginInfo, error) + NotifyRegistrationStatus(ctx context.Context, in *RegistrationStatus, opts ...grpc.CallOption) (*RegistrationStatusResponse, error) +} + +type registrationClient struct { + cc grpc.ClientConnInterface +} + +func NewRegistrationClient(cc grpc.ClientConnInterface) RegistrationClient { + return ®istrationClient{cc} +} + +func (c *registrationClient) GetInfo(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*PluginInfo, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(PluginInfo) + err := c.cc.Invoke(ctx, Registration_GetInfo_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *registrationClient) NotifyRegistrationStatus(ctx context.Context, in *RegistrationStatus, opts ...grpc.CallOption) (*RegistrationStatusResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(RegistrationStatusResponse) + err := c.cc.Invoke(ctx, Registration_NotifyRegistrationStatus_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// RegistrationServer is the server API for Registration service. +// All implementations must embed UnimplementedRegistrationServer +// for forward compatibility. +// +// Registration is the service advertised by the Plugins. +type RegistrationServer interface { + GetInfo(context.Context, *InfoRequest) (*PluginInfo, error) + NotifyRegistrationStatus(context.Context, *RegistrationStatus) (*RegistrationStatusResponse, error) + mustEmbedUnimplementedRegistrationServer() +} + +// UnimplementedRegistrationServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedRegistrationServer struct{} + +func (UnimplementedRegistrationServer) GetInfo(context.Context, *InfoRequest) (*PluginInfo, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetInfo not implemented") +} +func (UnimplementedRegistrationServer) NotifyRegistrationStatus(context.Context, *RegistrationStatus) (*RegistrationStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method NotifyRegistrationStatus not implemented") +} +func (UnimplementedRegistrationServer) mustEmbedUnimplementedRegistrationServer() {} +func (UnimplementedRegistrationServer) testEmbeddedByValue() {} + +// UnsafeRegistrationServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to RegistrationServer will +// result in compilation errors. +type UnsafeRegistrationServer interface { + mustEmbedUnimplementedRegistrationServer() +} + +func RegisterRegistrationServer(s grpc.ServiceRegistrar, srv RegistrationServer) { + // If the following call pancis, it indicates UnimplementedRegistrationServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&Registration_ServiceDesc, srv) +} + +func _Registration_GetInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(InfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RegistrationServer).GetInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Registration_GetInfo_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RegistrationServer).GetInfo(ctx, req.(*InfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Registration_NotifyRegistrationStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RegistrationStatus) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RegistrationServer).NotifyRegistrationStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Registration_NotifyRegistrationStatus_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RegistrationServer).NotifyRegistrationStatus(ctx, req.(*RegistrationStatus)) + } + return interceptor(ctx, in, info, handler) +} + +// Registration_ServiceDesc is the grpc.ServiceDesc for Registration service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Registration_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "pluginregistration.Registration", + HandlerType: (*RegistrationServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetInfo", + Handler: _Registration_GetInfo_Handler, + }, + { + MethodName: "NotifyRegistrationStatus", + Handler: _Registration_NotifyRegistrationStatus_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "staging/src/k8s.io/kubelet/pkg/apis/pluginregistration/v1/api.proto", +} diff --git a/pkg/apis/pluginregistration/v1alpha1/api.pb.go b/pkg/apis/pluginregistration/v1alpha1/api.pb.go index 6677019..11baa7e 100644 --- a/pkg/apis/pluginregistration/v1alpha1/api.pb.go +++ b/pkg/apis/pluginregistration/v1alpha1/api.pb.go @@ -14,39 +14,34 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: api.proto +// To regenerate api.pb.go run `hack/update-codegen.sh protobindings` + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.4 +// protoc v4.23.4 +// source: staging/src/k8s.io/kubelet/pkg/apis/pluginregistration/v1alpha1/api.proto package v1alpha1 import ( - context "context" - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" - strings "strings" + sync "sync" + unsafe "unsafe" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) // PluginInfo is the message sent from a plugin to the Kubelet pluginwatcher for plugin registration type PluginInfo struct { + state protoimpl.MessageState `protogen:"open.v1"` // Type of the Plugin. CSIPlugin or DevicePlugin Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` // Plugin name that uniquely identifies the plugin for the given plugin type. @@ -66,1084 +61,294 @@ type PluginInfo struct { // The Kubelet component communicating with the plugin should be able // to choose any preferred version from this list, or returns an error // if none of the listed versions is supported. - SupportedVersions []string `protobuf:"bytes,4,rep,name=supported_versions,json=supportedVersions,proto3" json:"supported_versions,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` + SupportedVersions []string `protobuf:"bytes,4,rep,name=supported_versions,json=supportedVersions,proto3" json:"supported_versions,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PluginInfo) Reset() { + *x = PluginInfo{} + mi := &file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1alpha1_api_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PluginInfo) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *PluginInfo) Reset() { *m = PluginInfo{} } func (*PluginInfo) ProtoMessage() {} -func (*PluginInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{0} -} -func (m *PluginInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PluginInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PluginInfo.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + +func (x *PluginInfo) ProtoReflect() protoreflect.Message { + mi := &file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1alpha1_api_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil + return ms } -} -func (m *PluginInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_PluginInfo.Merge(m, src) -} -func (m *PluginInfo) XXX_Size() int { - return m.Size() -} -func (m *PluginInfo) XXX_DiscardUnknown() { - xxx_messageInfo_PluginInfo.DiscardUnknown(m) + return mi.MessageOf(x) } -var xxx_messageInfo_PluginInfo proto.InternalMessageInfo +// Deprecated: Use PluginInfo.ProtoReflect.Descriptor instead. +func (*PluginInfo) Descriptor() ([]byte, []int) { + return file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1alpha1_api_proto_rawDescGZIP(), []int{0} +} -func (m *PluginInfo) GetType() string { - if m != nil { - return m.Type +func (x *PluginInfo) GetType() string { + if x != nil { + return x.Type } return "" } -func (m *PluginInfo) GetName() string { - if m != nil { - return m.Name +func (x *PluginInfo) GetName() string { + if x != nil { + return x.Name } return "" } -func (m *PluginInfo) GetEndpoint() string { - if m != nil { - return m.Endpoint +func (x *PluginInfo) GetEndpoint() string { + if x != nil { + return x.Endpoint } return "" } -func (m *PluginInfo) GetSupportedVersions() []string { - if m != nil { - return m.SupportedVersions +func (x *PluginInfo) GetSupportedVersions() []string { + if x != nil { + return x.SupportedVersions } return nil } // RegistrationStatus is the message sent from Kubelet pluginwatcher to the plugin for notification on registration status type RegistrationStatus struct { + state protoimpl.MessageState `protogen:"open.v1"` // True if plugin gets registered successfully at Kubelet PluginRegistered bool `protobuf:"varint,1,opt,name=plugin_registered,json=pluginRegistered,proto3" json:"plugin_registered,omitempty"` // Error message in case plugin fails to register, empty string otherwise - Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` + Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RegistrationStatus) Reset() { + *x = RegistrationStatus{} + mi := &file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1alpha1_api_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RegistrationStatus) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *RegistrationStatus) Reset() { *m = RegistrationStatus{} } func (*RegistrationStatus) ProtoMessage() {} -func (*RegistrationStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{1} -} -func (m *RegistrationStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RegistrationStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RegistrationStatus.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + +func (x *RegistrationStatus) ProtoReflect() protoreflect.Message { + mi := &file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1alpha1_api_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil + return ms } -} -func (m *RegistrationStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_RegistrationStatus.Merge(m, src) -} -func (m *RegistrationStatus) XXX_Size() int { - return m.Size() -} -func (m *RegistrationStatus) XXX_DiscardUnknown() { - xxx_messageInfo_RegistrationStatus.DiscardUnknown(m) + return mi.MessageOf(x) } -var xxx_messageInfo_RegistrationStatus proto.InternalMessageInfo +// Deprecated: Use RegistrationStatus.ProtoReflect.Descriptor instead. +func (*RegistrationStatus) Descriptor() ([]byte, []int) { + return file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1alpha1_api_proto_rawDescGZIP(), []int{1} +} -func (m *RegistrationStatus) GetPluginRegistered() bool { - if m != nil { - return m.PluginRegistered +func (x *RegistrationStatus) GetPluginRegistered() bool { + if x != nil { + return x.PluginRegistered } return false } -func (m *RegistrationStatus) GetError() string { - if m != nil { - return m.Error +func (x *RegistrationStatus) GetError() string { + if x != nil { + return x.Error } return "" } // RegistrationStatusResponse is sent by plugin to kubelet in response to RegistrationStatus RPC type RegistrationStatusResponse struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RegistrationStatusResponse) Reset() { + *x = RegistrationStatusResponse{} + mi := &file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1alpha1_api_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RegistrationStatusResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *RegistrationStatusResponse) Reset() { *m = RegistrationStatusResponse{} } func (*RegistrationStatusResponse) ProtoMessage() {} -func (*RegistrationStatusResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{2} -} -func (m *RegistrationStatusResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RegistrationStatusResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RegistrationStatusResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + +func (x *RegistrationStatusResponse) ProtoReflect() protoreflect.Message { + mi := &file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1alpha1_api_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil + return ms } -} -func (m *RegistrationStatusResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_RegistrationStatusResponse.Merge(m, src) -} -func (m *RegistrationStatusResponse) XXX_Size() int { - return m.Size() -} -func (m *RegistrationStatusResponse) XXX_DiscardUnknown() { - xxx_messageInfo_RegistrationStatusResponse.DiscardUnknown(m) + return mi.MessageOf(x) } -var xxx_messageInfo_RegistrationStatusResponse proto.InternalMessageInfo +// Deprecated: Use RegistrationStatusResponse.ProtoReflect.Descriptor instead. +func (*RegistrationStatusResponse) Descriptor() ([]byte, []int) { + return file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1alpha1_api_proto_rawDescGZIP(), []int{2} +} // InfoRequest is the empty request message from Kubelet type InfoRequest struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *InfoRequest) Reset() { + *x = InfoRequest{} + mi := &file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1alpha1_api_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *InfoRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *InfoRequest) Reset() { *m = InfoRequest{} } func (*InfoRequest) ProtoMessage() {} + +func (x *InfoRequest) ProtoReflect() protoreflect.Message { + mi := &file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1alpha1_api_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InfoRequest.ProtoReflect.Descriptor instead. func (*InfoRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{3} -} -func (m *InfoRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *InfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_InfoRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *InfoRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_InfoRequest.Merge(m, src) -} -func (m *InfoRequest) XXX_Size() int { - return m.Size() -} -func (m *InfoRequest) XXX_DiscardUnknown() { - xxx_messageInfo_InfoRequest.DiscardUnknown(m) + return file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1alpha1_api_proto_rawDescGZIP(), []int{3} } -var xxx_messageInfo_InfoRequest proto.InternalMessageInfo +var File_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1alpha1_api_proto protoreflect.FileDescriptor -func init() { - proto.RegisterType((*PluginInfo)(nil), "pluginregistration.PluginInfo") - proto.RegisterType((*RegistrationStatus)(nil), "pluginregistration.RegistrationStatus") - proto.RegisterType((*RegistrationStatusResponse)(nil), "pluginregistration.RegistrationStatusResponse") - proto.RegisterType((*InfoRequest)(nil), "pluginregistration.InfoRequest") -} - -func init() { proto.RegisterFile("api.proto", fileDescriptor_00212fb1f9d3bf1c) } - -var fileDescriptor_00212fb1f9d3bf1c = []byte{ - // 373 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x52, 0x41, 0x4b, 0xe3, 0x40, - 0x14, 0xce, 0x6c, 0xbb, 0xbb, 0xed, 0xec, 0x2e, 0x6c, 0x87, 0x3d, 0x84, 0xb0, 0x8c, 0x25, 0x07, - 0x29, 0x48, 0x13, 0x6a, 0x2f, 0x9e, 0xbd, 0x88, 0x20, 0xa2, 0x11, 0x14, 0xbc, 0x94, 0xc4, 0xbe, - 0xa6, 0x43, 0xdb, 0x99, 0x71, 0x66, 0x52, 0xe8, 0x49, 0x7f, 0x82, 0x3f, 0xab, 0x47, 0xf1, 0xe4, - 0xd1, 0xc6, 0x3f, 0x22, 0x9d, 0x94, 0x58, 0x48, 0x0f, 0xde, 0xde, 0xf7, 0xbd, 0xef, 0xbd, 0x79, - 0xdf, 0xc7, 0xe0, 0x66, 0x2c, 0x59, 0x20, 0x95, 0x30, 0x82, 0x10, 0x39, 0xcd, 0x52, 0xc6, 0x15, - 0xa4, 0x4c, 0x1b, 0x15, 0x1b, 0x26, 0xb8, 0xd7, 0x4d, 0x99, 0x19, 0x67, 0x49, 0x70, 0x27, 0x66, - 0x61, 0x2a, 0x52, 0x11, 0x5a, 0x69, 0x92, 0x8d, 0x2c, 0xb2, 0xc0, 0x56, 0xc5, 0x0a, 0xff, 0x01, - 0xe3, 0x0b, 0xbb, 0xe4, 0x94, 0x8f, 0x04, 0x21, 0xb8, 0x6e, 0x16, 0x12, 0x5c, 0xd4, 0x46, 0x9d, - 0x66, 0x64, 0xeb, 0x35, 0xc7, 0xe3, 0x19, 0xb8, 0xdf, 0x0a, 0x6e, 0x5d, 0x13, 0x0f, 0x37, 0x80, - 0x0f, 0xa5, 0x60, 0xdc, 0xb8, 0x35, 0xcb, 0x97, 0x98, 0x74, 0x31, 0xd1, 0x99, 0x94, 0x42, 0x19, - 0x18, 0x0e, 0xe6, 0xa0, 0x34, 0x13, 0x5c, 0xbb, 0xf5, 0x76, 0xad, 0xd3, 0x8c, 0x5a, 0x65, 0xe7, - 0x7a, 0xd3, 0xf0, 0x6f, 0x30, 0x89, 0xb6, 0xee, 0xbf, 0x32, 0xb1, 0xc9, 0x34, 0x39, 0xc0, 0xad, - 0xc2, 0xdb, 0xa0, 0x30, 0x07, 0x0a, 0x86, 0xf6, 0xaa, 0x46, 0xf4, 0xb7, 0x68, 0x44, 0x25, 0x4f, - 0xfe, 0xe1, 0xef, 0xa0, 0x94, 0x50, 0x9b, 0x13, 0x0b, 0xe0, 0xff, 0xc7, 0x5e, 0x75, 0x71, 0x04, - 0x5a, 0x0a, 0xae, 0xc1, 0xff, 0x83, 0x7f, 0xad, 0x1d, 0x47, 0x70, 0x9f, 0x81, 0x36, 0x87, 0x2f, - 0x08, 0xff, 0xde, 0x56, 0x93, 0x33, 0xfc, 0xf3, 0x04, 0x8c, 0x0d, 0x65, 0x2f, 0xa8, 0xc6, 0x1c, - 0x6c, 0x0d, 0x7b, 0x74, 0x97, 0xe0, 0x33, 0x55, 0xdf, 0x21, 0x06, 0xbb, 0xe7, 0xc2, 0xb0, 0xd1, - 0x62, 0x87, 0xd5, 0xfd, 0x5d, 0xd3, 0x55, 0x9d, 0x17, 0x7c, 0x4d, 0x57, 0x3a, 0x74, 0x8e, 0x2f, - 0x97, 0x2b, 0x8a, 0x5e, 0x57, 0xd4, 0x79, 0xcc, 0x29, 0x5a, 0xe6, 0x14, 0x3d, 0xe7, 0x14, 0xbd, - 0xe5, 0x14, 0x3d, 0xbd, 0x53, 0xe7, 0xb6, 0x3f, 0x39, 0xd2, 0x01, 0x13, 0xe1, 0x24, 0x4b, 0x60, - 0x0a, 0x26, 0x94, 0x93, 0x34, 0x8c, 0x25, 0xd3, 0x61, 0xf5, 0x99, 0x70, 0xde, 0x8b, 0xa7, 0x72, - 0x1c, 0xf7, 0x92, 0x1f, 0xf6, 0xd7, 0xf4, 0x3f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x60, 0x59, 0x70, - 0xa3, 0x85, 0x02, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// RegistrationClient is the client API for Registration service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type RegistrationClient interface { - GetInfo(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*PluginInfo, error) - NotifyRegistrationStatus(ctx context.Context, in *RegistrationStatus, opts ...grpc.CallOption) (*RegistrationStatusResponse, error) -} - -type registrationClient struct { - cc *grpc.ClientConn -} - -func NewRegistrationClient(cc *grpc.ClientConn) RegistrationClient { - return ®istrationClient{cc} -} - -func (c *registrationClient) GetInfo(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*PluginInfo, error) { - out := new(PluginInfo) - err := c.cc.Invoke(ctx, "/pluginregistration.Registration/GetInfo", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *registrationClient) NotifyRegistrationStatus(ctx context.Context, in *RegistrationStatus, opts ...grpc.CallOption) (*RegistrationStatusResponse, error) { - out := new(RegistrationStatusResponse) - err := c.cc.Invoke(ctx, "/pluginregistration.Registration/NotifyRegistrationStatus", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// RegistrationServer is the server API for Registration service. -type RegistrationServer interface { - GetInfo(context.Context, *InfoRequest) (*PluginInfo, error) - NotifyRegistrationStatus(context.Context, *RegistrationStatus) (*RegistrationStatusResponse, error) -} - -// UnimplementedRegistrationServer can be embedded to have forward compatible implementations. -type UnimplementedRegistrationServer struct { -} - -func (*UnimplementedRegistrationServer) GetInfo(ctx context.Context, req *InfoRequest) (*PluginInfo, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetInfo not implemented") -} -func (*UnimplementedRegistrationServer) NotifyRegistrationStatus(ctx context.Context, req *RegistrationStatus) (*RegistrationStatusResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method NotifyRegistrationStatus not implemented") -} - -func RegisterRegistrationServer(s *grpc.Server, srv RegistrationServer) { - s.RegisterService(&_Registration_serviceDesc, srv) -} - -func _Registration_GetInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(InfoRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RegistrationServer).GetInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pluginregistration.Registration/GetInfo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RegistrationServer).GetInfo(ctx, req.(*InfoRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Registration_NotifyRegistrationStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RegistrationStatus) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RegistrationServer).NotifyRegistrationStatus(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pluginregistration.Registration/NotifyRegistrationStatus", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RegistrationServer).NotifyRegistrationStatus(ctx, req.(*RegistrationStatus)) - } - return interceptor(ctx, in, info, handler) -} - -var _Registration_serviceDesc = grpc.ServiceDesc{ - ServiceName: "pluginregistration.Registration", - HandlerType: (*RegistrationServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetInfo", - Handler: _Registration_GetInfo_Handler, - }, - { - MethodName: "NotifyRegistrationStatus", - Handler: _Registration_NotifyRegistrationStatus_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "api.proto", -} - -func (m *PluginInfo) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *PluginInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PluginInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.SupportedVersions) > 0 { - for iNdEx := len(m.SupportedVersions) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.SupportedVersions[iNdEx]) - copy(dAtA[i:], m.SupportedVersions[iNdEx]) - i = encodeVarintApi(dAtA, i, uint64(len(m.SupportedVersions[iNdEx]))) - i-- - dAtA[i] = 0x22 - } - } - if len(m.Endpoint) > 0 { - i -= len(m.Endpoint) - copy(dAtA[i:], m.Endpoint) - i = encodeVarintApi(dAtA, i, uint64(len(m.Endpoint))) - i-- - dAtA[i] = 0x1a - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintApi(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x12 - } - if len(m.Type) > 0 { - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintApi(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *RegistrationStatus) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RegistrationStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RegistrationStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Error) > 0 { - i -= len(m.Error) - copy(dAtA[i:], m.Error) - i = encodeVarintApi(dAtA, i, uint64(len(m.Error))) - i-- - dAtA[i] = 0x12 - } - if m.PluginRegistered { - i-- - if m.PluginRegistered { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *RegistrationStatusResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RegistrationStatusResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RegistrationStatusResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *InfoRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *InfoRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *InfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func encodeVarintApi(dAtA []byte, offset int, v uint64) int { - offset -= sovApi(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *PluginInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Type) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) - } - l = len(m.Name) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) - } - l = len(m.Endpoint) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) - } - if len(m.SupportedVersions) > 0 { - for _, s := range m.SupportedVersions { - l = len(s) - n += 1 + l + sovApi(uint64(l)) - } - } - return n -} - -func (m *RegistrationStatus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.PluginRegistered { - n += 2 - } - l = len(m.Error) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) - } - return n -} - -func (m *RegistrationStatusResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *InfoRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func sovApi(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozApi(x uint64) (n int) { - return sovApi(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *PluginInfo) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&PluginInfo{`, - `Type:` + fmt.Sprintf("%v", this.Type) + `,`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Endpoint:` + fmt.Sprintf("%v", this.Endpoint) + `,`, - `SupportedVersions:` + fmt.Sprintf("%v", this.SupportedVersions) + `,`, - `}`, - }, "") - return s -} -func (this *RegistrationStatus) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&RegistrationStatus{`, - `PluginRegistered:` + fmt.Sprintf("%v", this.PluginRegistered) + `,`, - `Error:` + fmt.Sprintf("%v", this.Error) + `,`, - `}`, - }, "") - return s -} -func (this *RegistrationStatusResponse) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&RegistrationStatusResponse{`, - `}`, - }, "") - return s -} -func (this *InfoRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&InfoRequest{`, - `}`, - }, "") - return s -} -func valueToStringApi(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *PluginInfo) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: PluginInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PluginInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthApi - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthApi - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthApi - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthApi - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Endpoint", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthApi - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthApi - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Endpoint = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SupportedVersions", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthApi - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthApi - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SupportedVersions = append(m.SupportedVersions, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipApi(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthApi - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RegistrationStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RegistrationStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RegistrationStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PluginRegistered", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.PluginRegistered = bool(v != 0) - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthApi - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthApi - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Error = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipApi(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthApi - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RegistrationStatusResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RegistrationStatusResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RegistrationStatusResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipApi(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthApi - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *InfoRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: InfoRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: InfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipApi(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthApi - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipApi(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowApi - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowApi - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowApi - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthApi - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupApi - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthApi - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} +var file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1alpha1_api_proto_rawDesc = string([]byte{ + 0x0a, 0x49, 0x73, 0x74, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x2f, 0x73, 0x72, 0x63, 0x2f, 0x6b, 0x38, + 0x73, 0x2e, 0x69, 0x6f, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x6c, 0x65, 0x74, 0x2f, 0x70, 0x6b, 0x67, + 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x72, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2f, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x70, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, + 0x7f, 0x0a, 0x0a, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x12, 0x2d, 0x0a, 0x12, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x73, + 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x22, 0x57, 0x0a, 0x12, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, + 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x10, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, + 0x72, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x1c, 0x0a, 0x1a, 0x52, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0d, 0x0a, 0x0b, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x32, 0xd2, 0x01, 0x0a, 0x0c, 0x52, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4c, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x49, 0x6e, + 0x66, 0x6f, 0x12, 0x1f, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x72, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x49, + 0x6e, 0x66, 0x6f, 0x22, 0x00, 0x12, 0x74, 0x0a, 0x18, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x52, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x26, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x1a, 0x2e, 0x2e, 0x70, 0x6c, 0x75, 0x67, + 0x69, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x35, 0x5a, 0x33, 0x6b, + 0x38, 0x73, 0x2e, 0x69, 0x6f, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x6c, 0x65, 0x74, 0x2f, 0x70, 0x6b, + 0x67, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x72, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +}) var ( - ErrInvalidLengthApi = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowApi = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupApi = fmt.Errorf("proto: unexpected end of group") + file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1alpha1_api_proto_rawDescOnce sync.Once + file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1alpha1_api_proto_rawDescData []byte ) + +func file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1alpha1_api_proto_rawDescGZIP() []byte { + file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1alpha1_api_proto_rawDescOnce.Do(func() { + file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1alpha1_api_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1alpha1_api_proto_rawDesc), len(file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1alpha1_api_proto_rawDesc))) + }) + return file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1alpha1_api_proto_rawDescData +} + +var file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1alpha1_api_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1alpha1_api_proto_goTypes = []any{ + (*PluginInfo)(nil), // 0: pluginregistration.PluginInfo + (*RegistrationStatus)(nil), // 1: pluginregistration.RegistrationStatus + (*RegistrationStatusResponse)(nil), // 2: pluginregistration.RegistrationStatusResponse + (*InfoRequest)(nil), // 3: pluginregistration.InfoRequest +} +var file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1alpha1_api_proto_depIdxs = []int32{ + 3, // 0: pluginregistration.Registration.GetInfo:input_type -> pluginregistration.InfoRequest + 1, // 1: pluginregistration.Registration.NotifyRegistrationStatus:input_type -> pluginregistration.RegistrationStatus + 0, // 2: pluginregistration.Registration.GetInfo:output_type -> pluginregistration.PluginInfo + 2, // 3: pluginregistration.Registration.NotifyRegistrationStatus:output_type -> pluginregistration.RegistrationStatusResponse + 2, // [2:4] is the sub-list for method output_type + 0, // [0:2] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1alpha1_api_proto_init() } +func file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1alpha1_api_proto_init() { + if File_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1alpha1_api_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1alpha1_api_proto_rawDesc), len(file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1alpha1_api_proto_rawDesc)), + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1alpha1_api_proto_goTypes, + DependencyIndexes: file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1alpha1_api_proto_depIdxs, + MessageInfos: file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1alpha1_api_proto_msgTypes, + }.Build() + File_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1alpha1_api_proto = out.File + file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1alpha1_api_proto_goTypes = nil + file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1alpha1_api_proto_depIdxs = nil +} diff --git a/pkg/apis/pluginregistration/v1alpha1/api.proto b/pkg/apis/pluginregistration/v1alpha1/api.proto index fceb08b..9917082 100644 --- a/pkg/apis/pluginregistration/v1alpha1/api.proto +++ b/pkg/apis/pluginregistration/v1alpha1/api.proto @@ -4,16 +4,6 @@ syntax = "proto3"; package pluginregistration; // This should have been v1alpha1. option go_package = "k8s.io/kubelet/pkg/apis/pluginregistration/v1alpha1"; -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.stringer_all) = true; -option (gogoproto.goproto_getters_all) = true; -option (gogoproto.marshaler_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.goproto_unrecognized_all) = false; - // PluginInfo is the message sent from a plugin to the Kubelet pluginwatcher for plugin registration message PluginInfo { // Type of the Plugin. CSIPlugin or DevicePlugin diff --git a/pkg/apis/pluginregistration/v1alpha1/api_grpc.pb.go b/pkg/apis/pluginregistration/v1alpha1/api_grpc.pb.go new file mode 100644 index 0000000..bb91f48 --- /dev/null +++ b/pkg/apis/pluginregistration/v1alpha1/api_grpc.pb.go @@ -0,0 +1,181 @@ +/* +Copyright 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. +*/ + +// To regenerate api.pb.go run `hack/update-codegen.sh protobindings` + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc v4.23.4 +// source: staging/src/k8s.io/kubelet/pkg/apis/pluginregistration/v1alpha1/api.proto + +package v1alpha1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + Registration_GetInfo_FullMethodName = "/pluginregistration.Registration/GetInfo" + Registration_NotifyRegistrationStatus_FullMethodName = "/pluginregistration.Registration/NotifyRegistrationStatus" +) + +// RegistrationClient is the client API for Registration service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Registration is the service advertised by the Plugins. +type RegistrationClient interface { + GetInfo(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*PluginInfo, error) + NotifyRegistrationStatus(ctx context.Context, in *RegistrationStatus, opts ...grpc.CallOption) (*RegistrationStatusResponse, error) +} + +type registrationClient struct { + cc grpc.ClientConnInterface +} + +func NewRegistrationClient(cc grpc.ClientConnInterface) RegistrationClient { + return ®istrationClient{cc} +} + +func (c *registrationClient) GetInfo(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*PluginInfo, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(PluginInfo) + err := c.cc.Invoke(ctx, Registration_GetInfo_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *registrationClient) NotifyRegistrationStatus(ctx context.Context, in *RegistrationStatus, opts ...grpc.CallOption) (*RegistrationStatusResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(RegistrationStatusResponse) + err := c.cc.Invoke(ctx, Registration_NotifyRegistrationStatus_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// RegistrationServer is the server API for Registration service. +// All implementations must embed UnimplementedRegistrationServer +// for forward compatibility. +// +// Registration is the service advertised by the Plugins. +type RegistrationServer interface { + GetInfo(context.Context, *InfoRequest) (*PluginInfo, error) + NotifyRegistrationStatus(context.Context, *RegistrationStatus) (*RegistrationStatusResponse, error) + mustEmbedUnimplementedRegistrationServer() +} + +// UnimplementedRegistrationServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedRegistrationServer struct{} + +func (UnimplementedRegistrationServer) GetInfo(context.Context, *InfoRequest) (*PluginInfo, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetInfo not implemented") +} +func (UnimplementedRegistrationServer) NotifyRegistrationStatus(context.Context, *RegistrationStatus) (*RegistrationStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method NotifyRegistrationStatus not implemented") +} +func (UnimplementedRegistrationServer) mustEmbedUnimplementedRegistrationServer() {} +func (UnimplementedRegistrationServer) testEmbeddedByValue() {} + +// UnsafeRegistrationServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to RegistrationServer will +// result in compilation errors. +type UnsafeRegistrationServer interface { + mustEmbedUnimplementedRegistrationServer() +} + +func RegisterRegistrationServer(s grpc.ServiceRegistrar, srv RegistrationServer) { + // If the following call pancis, it indicates UnimplementedRegistrationServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&Registration_ServiceDesc, srv) +} + +func _Registration_GetInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(InfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RegistrationServer).GetInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Registration_GetInfo_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RegistrationServer).GetInfo(ctx, req.(*InfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Registration_NotifyRegistrationStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RegistrationStatus) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RegistrationServer).NotifyRegistrationStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Registration_NotifyRegistrationStatus_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RegistrationServer).NotifyRegistrationStatus(ctx, req.(*RegistrationStatus)) + } + return interceptor(ctx, in, info, handler) +} + +// Registration_ServiceDesc is the grpc.ServiceDesc for Registration service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Registration_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "pluginregistration.Registration", + HandlerType: (*RegistrationServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetInfo", + Handler: _Registration_GetInfo_Handler, + }, + { + MethodName: "NotifyRegistrationStatus", + Handler: _Registration_NotifyRegistrationStatus_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "staging/src/k8s.io/kubelet/pkg/apis/pluginregistration/v1alpha1/api.proto", +} diff --git a/pkg/apis/pluginregistration/v1beta1/api.pb.go b/pkg/apis/pluginregistration/v1beta1/api.pb.go index eae354b..501a9a3 100644 --- a/pkg/apis/pluginregistration/v1beta1/api.pb.go +++ b/pkg/apis/pluginregistration/v1beta1/api.pb.go @@ -14,39 +14,34 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: api.proto +// To regenerate api.pb.go run `hack/update-codegen.sh protobindings` + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.4 +// protoc v4.23.4 +// source: staging/src/k8s.io/kubelet/pkg/apis/pluginregistration/v1beta1/api.proto package v1beta1 import ( - context "context" - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" - strings "strings" + sync "sync" + unsafe "unsafe" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) // PluginInfo is the message sent from a plugin to the Kubelet pluginwatcher for plugin registration type PluginInfo struct { + state protoimpl.MessageState `protogen:"open.v1"` // Type of the Plugin. CSIPlugin or DevicePlugin Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` // Plugin name that uniquely identifies the plugin for the given plugin type. @@ -66,1084 +61,294 @@ type PluginInfo struct { // The Kubelet component communicating with the plugin should be able // to choose any preferred version from this list, or returns an error // if none of the listed versions is supported. - SupportedVersions []string `protobuf:"bytes,4,rep,name=supported_versions,json=supportedVersions,proto3" json:"supported_versions,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` + SupportedVersions []string `protobuf:"bytes,4,rep,name=supported_versions,json=supportedVersions,proto3" json:"supported_versions,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PluginInfo) Reset() { + *x = PluginInfo{} + mi := &file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1beta1_api_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PluginInfo) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *PluginInfo) Reset() { *m = PluginInfo{} } func (*PluginInfo) ProtoMessage() {} -func (*PluginInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{0} -} -func (m *PluginInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PluginInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PluginInfo.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + +func (x *PluginInfo) ProtoReflect() protoreflect.Message { + mi := &file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1beta1_api_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil + return ms } -} -func (m *PluginInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_PluginInfo.Merge(m, src) -} -func (m *PluginInfo) XXX_Size() int { - return m.Size() -} -func (m *PluginInfo) XXX_DiscardUnknown() { - xxx_messageInfo_PluginInfo.DiscardUnknown(m) + return mi.MessageOf(x) } -var xxx_messageInfo_PluginInfo proto.InternalMessageInfo +// Deprecated: Use PluginInfo.ProtoReflect.Descriptor instead. +func (*PluginInfo) Descriptor() ([]byte, []int) { + return file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1beta1_api_proto_rawDescGZIP(), []int{0} +} -func (m *PluginInfo) GetType() string { - if m != nil { - return m.Type +func (x *PluginInfo) GetType() string { + if x != nil { + return x.Type } return "" } -func (m *PluginInfo) GetName() string { - if m != nil { - return m.Name +func (x *PluginInfo) GetName() string { + if x != nil { + return x.Name } return "" } -func (m *PluginInfo) GetEndpoint() string { - if m != nil { - return m.Endpoint +func (x *PluginInfo) GetEndpoint() string { + if x != nil { + return x.Endpoint } return "" } -func (m *PluginInfo) GetSupportedVersions() []string { - if m != nil { - return m.SupportedVersions +func (x *PluginInfo) GetSupportedVersions() []string { + if x != nil { + return x.SupportedVersions } return nil } // RegistrationStatus is the message sent from Kubelet pluginwatcher to the plugin for notification on registration status type RegistrationStatus struct { + state protoimpl.MessageState `protogen:"open.v1"` // True if plugin gets registered successfully at Kubelet PluginRegistered bool `protobuf:"varint,1,opt,name=plugin_registered,json=pluginRegistered,proto3" json:"plugin_registered,omitempty"` // Error message in case plugin fails to register, empty string otherwise - Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` + Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RegistrationStatus) Reset() { + *x = RegistrationStatus{} + mi := &file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1beta1_api_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RegistrationStatus) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *RegistrationStatus) Reset() { *m = RegistrationStatus{} } func (*RegistrationStatus) ProtoMessage() {} -func (*RegistrationStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{1} -} -func (m *RegistrationStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RegistrationStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RegistrationStatus.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + +func (x *RegistrationStatus) ProtoReflect() protoreflect.Message { + mi := &file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1beta1_api_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil + return ms } -} -func (m *RegistrationStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_RegistrationStatus.Merge(m, src) -} -func (m *RegistrationStatus) XXX_Size() int { - return m.Size() -} -func (m *RegistrationStatus) XXX_DiscardUnknown() { - xxx_messageInfo_RegistrationStatus.DiscardUnknown(m) + return mi.MessageOf(x) } -var xxx_messageInfo_RegistrationStatus proto.InternalMessageInfo +// Deprecated: Use RegistrationStatus.ProtoReflect.Descriptor instead. +func (*RegistrationStatus) Descriptor() ([]byte, []int) { + return file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1beta1_api_proto_rawDescGZIP(), []int{1} +} -func (m *RegistrationStatus) GetPluginRegistered() bool { - if m != nil { - return m.PluginRegistered +func (x *RegistrationStatus) GetPluginRegistered() bool { + if x != nil { + return x.PluginRegistered } return false } -func (m *RegistrationStatus) GetError() string { - if m != nil { - return m.Error +func (x *RegistrationStatus) GetError() string { + if x != nil { + return x.Error } return "" } // RegistrationStatusResponse is sent by plugin to kubelet in response to RegistrationStatus RPC type RegistrationStatusResponse struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RegistrationStatusResponse) Reset() { + *x = RegistrationStatusResponse{} + mi := &file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1beta1_api_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RegistrationStatusResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *RegistrationStatusResponse) Reset() { *m = RegistrationStatusResponse{} } func (*RegistrationStatusResponse) ProtoMessage() {} -func (*RegistrationStatusResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{2} -} -func (m *RegistrationStatusResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RegistrationStatusResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RegistrationStatusResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + +func (x *RegistrationStatusResponse) ProtoReflect() protoreflect.Message { + mi := &file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1beta1_api_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil + return ms } -} -func (m *RegistrationStatusResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_RegistrationStatusResponse.Merge(m, src) -} -func (m *RegistrationStatusResponse) XXX_Size() int { - return m.Size() -} -func (m *RegistrationStatusResponse) XXX_DiscardUnknown() { - xxx_messageInfo_RegistrationStatusResponse.DiscardUnknown(m) + return mi.MessageOf(x) } -var xxx_messageInfo_RegistrationStatusResponse proto.InternalMessageInfo +// Deprecated: Use RegistrationStatusResponse.ProtoReflect.Descriptor instead. +func (*RegistrationStatusResponse) Descriptor() ([]byte, []int) { + return file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1beta1_api_proto_rawDescGZIP(), []int{2} +} // InfoRequest is the empty request message from Kubelet type InfoRequest struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *InfoRequest) Reset() { + *x = InfoRequest{} + mi := &file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1beta1_api_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *InfoRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *InfoRequest) Reset() { *m = InfoRequest{} } func (*InfoRequest) ProtoMessage() {} + +func (x *InfoRequest) ProtoReflect() protoreflect.Message { + mi := &file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1beta1_api_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InfoRequest.ProtoReflect.Descriptor instead. func (*InfoRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{3} -} -func (m *InfoRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *InfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_InfoRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *InfoRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_InfoRequest.Merge(m, src) -} -func (m *InfoRequest) XXX_Size() int { - return m.Size() -} -func (m *InfoRequest) XXX_DiscardUnknown() { - xxx_messageInfo_InfoRequest.DiscardUnknown(m) + return file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1beta1_api_proto_rawDescGZIP(), []int{3} } -var xxx_messageInfo_InfoRequest proto.InternalMessageInfo +var File_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1beta1_api_proto protoreflect.FileDescriptor -func init() { - proto.RegisterType((*PluginInfo)(nil), "pluginregistration.PluginInfo") - proto.RegisterType((*RegistrationStatus)(nil), "pluginregistration.RegistrationStatus") - proto.RegisterType((*RegistrationStatusResponse)(nil), "pluginregistration.RegistrationStatusResponse") - proto.RegisterType((*InfoRequest)(nil), "pluginregistration.InfoRequest") -} - -func init() { proto.RegisterFile("api.proto", fileDescriptor_00212fb1f9d3bf1c) } - -var fileDescriptor_00212fb1f9d3bf1c = []byte{ - // 371 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x52, 0x41, 0x4b, 0xe3, 0x40, - 0x14, 0xce, 0x6c, 0xbb, 0xbb, 0xed, 0xec, 0x2e, 0x6c, 0x07, 0x0f, 0x21, 0xc8, 0x58, 0x72, 0x90, - 0x82, 0x34, 0xa1, 0xf5, 0xe2, 0xd9, 0x8b, 0x08, 0x22, 0x25, 0x82, 0x82, 0x97, 0x92, 0xd8, 0xd7, - 0x38, 0xb4, 0x9d, 0x19, 0x67, 0x26, 0x85, 0x9e, 0xf4, 0x27, 0xf8, 0xb3, 0x7a, 0x14, 0x4f, 0x1e, - 0x6d, 0xfc, 0x23, 0xd2, 0x49, 0x89, 0x85, 0xf4, 0xe0, 0xed, 0x7d, 0xdf, 0xfb, 0xde, 0x9b, 0xf7, - 0x7d, 0x0c, 0x6e, 0xc6, 0x92, 0x05, 0x52, 0x09, 0x23, 0x08, 0x91, 0xd3, 0x2c, 0x65, 0x5c, 0x41, - 0xca, 0xb4, 0x51, 0xb1, 0x61, 0x82, 0x7b, 0xdd, 0x94, 0x99, 0xfb, 0x2c, 0x09, 0xee, 0xc4, 0x2c, - 0x4c, 0x45, 0x2a, 0x42, 0x2b, 0x4d, 0xb2, 0xb1, 0x45, 0x16, 0xd8, 0xaa, 0x58, 0xe1, 0x3f, 0x62, - 0x3c, 0xb0, 0x4b, 0xce, 0xf9, 0x58, 0x10, 0x82, 0xeb, 0x66, 0x21, 0xc1, 0x45, 0x6d, 0xd4, 0x69, - 0x46, 0xb6, 0x5e, 0x73, 0x3c, 0x9e, 0x81, 0xfb, 0xa3, 0xe0, 0xd6, 0x35, 0xf1, 0x70, 0x03, 0xf8, - 0x48, 0x0a, 0xc6, 0x8d, 0x5b, 0xb3, 0x7c, 0x89, 0x49, 0x17, 0x13, 0x9d, 0x49, 0x29, 0x94, 0x81, - 0xd1, 0x70, 0x0e, 0x4a, 0x33, 0xc1, 0xb5, 0x5b, 0x6f, 0xd7, 0x3a, 0xcd, 0xa8, 0x55, 0x76, 0xae, - 0x37, 0x0d, 0xff, 0x06, 0x93, 0x68, 0xeb, 0xfe, 0x2b, 0x13, 0x9b, 0x4c, 0x93, 0x23, 0xdc, 0x2a, - 0xbc, 0x0d, 0x0b, 0x73, 0xa0, 0x60, 0x64, 0xaf, 0x6a, 0x44, 0xff, 0x8b, 0x46, 0x54, 0xf2, 0x64, - 0x0f, 0xff, 0x04, 0xa5, 0x84, 0xda, 0x9c, 0x58, 0x00, 0x7f, 0x1f, 0x7b, 0xd5, 0xc5, 0x11, 0x68, - 0x29, 0xb8, 0x06, 0xff, 0x1f, 0xfe, 0xb3, 0x76, 0x1c, 0xc1, 0x43, 0x06, 0xda, 0xf4, 0x5f, 0x11, - 0xfe, 0xbb, 0xad, 0x26, 0x17, 0xf8, 0xf7, 0x19, 0x18, 0x1b, 0xca, 0x41, 0x50, 0x8d, 0x39, 0xd8, - 0x1a, 0xf6, 0xe8, 0x2e, 0xc1, 0x57, 0xaa, 0xbe, 0x43, 0x0c, 0x76, 0x2f, 0x85, 0x61, 0xe3, 0xc5, - 0x0e, 0xab, 0x87, 0xbb, 0xa6, 0xab, 0x3a, 0x2f, 0xf8, 0x9e, 0xae, 0x74, 0xe8, 0x9c, 0x0e, 0x96, - 0x2b, 0x8a, 0xde, 0x56, 0xd4, 0x79, 0xca, 0x29, 0x5a, 0xe6, 0x14, 0xbd, 0xe4, 0x14, 0xbd, 0xe7, - 0x14, 0x3d, 0x7f, 0x50, 0xe7, 0xb6, 0x3f, 0x39, 0xd1, 0x01, 0x13, 0xe1, 0x24, 0x4b, 0x60, 0x0a, - 0x26, 0x94, 0x93, 0x34, 0x8c, 0x25, 0xd3, 0x61, 0xf5, 0x99, 0x70, 0xde, 0x4b, 0xc0, 0xc4, 0xbd, - 0xe4, 0x97, 0xfd, 0x34, 0xc7, 0x9f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x96, 0x77, 0xbe, 0xaa, 0x84, - 0x02, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// RegistrationClient is the client API for Registration service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type RegistrationClient interface { - GetInfo(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*PluginInfo, error) - NotifyRegistrationStatus(ctx context.Context, in *RegistrationStatus, opts ...grpc.CallOption) (*RegistrationStatusResponse, error) -} - -type registrationClient struct { - cc *grpc.ClientConn -} - -func NewRegistrationClient(cc *grpc.ClientConn) RegistrationClient { - return ®istrationClient{cc} -} - -func (c *registrationClient) GetInfo(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*PluginInfo, error) { - out := new(PluginInfo) - err := c.cc.Invoke(ctx, "/pluginregistration.Registration/GetInfo", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *registrationClient) NotifyRegistrationStatus(ctx context.Context, in *RegistrationStatus, opts ...grpc.CallOption) (*RegistrationStatusResponse, error) { - out := new(RegistrationStatusResponse) - err := c.cc.Invoke(ctx, "/pluginregistration.Registration/NotifyRegistrationStatus", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// RegistrationServer is the server API for Registration service. -type RegistrationServer interface { - GetInfo(context.Context, *InfoRequest) (*PluginInfo, error) - NotifyRegistrationStatus(context.Context, *RegistrationStatus) (*RegistrationStatusResponse, error) -} - -// UnimplementedRegistrationServer can be embedded to have forward compatible implementations. -type UnimplementedRegistrationServer struct { -} - -func (*UnimplementedRegistrationServer) GetInfo(ctx context.Context, req *InfoRequest) (*PluginInfo, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetInfo not implemented") -} -func (*UnimplementedRegistrationServer) NotifyRegistrationStatus(ctx context.Context, req *RegistrationStatus) (*RegistrationStatusResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method NotifyRegistrationStatus not implemented") -} - -func RegisterRegistrationServer(s *grpc.Server, srv RegistrationServer) { - s.RegisterService(&_Registration_serviceDesc, srv) -} - -func _Registration_GetInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(InfoRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RegistrationServer).GetInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pluginregistration.Registration/GetInfo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RegistrationServer).GetInfo(ctx, req.(*InfoRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Registration_NotifyRegistrationStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RegistrationStatus) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RegistrationServer).NotifyRegistrationStatus(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pluginregistration.Registration/NotifyRegistrationStatus", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RegistrationServer).NotifyRegistrationStatus(ctx, req.(*RegistrationStatus)) - } - return interceptor(ctx, in, info, handler) -} - -var _Registration_serviceDesc = grpc.ServiceDesc{ - ServiceName: "pluginregistration.Registration", - HandlerType: (*RegistrationServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetInfo", - Handler: _Registration_GetInfo_Handler, - }, - { - MethodName: "NotifyRegistrationStatus", - Handler: _Registration_NotifyRegistrationStatus_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "api.proto", -} - -func (m *PluginInfo) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *PluginInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PluginInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.SupportedVersions) > 0 { - for iNdEx := len(m.SupportedVersions) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.SupportedVersions[iNdEx]) - copy(dAtA[i:], m.SupportedVersions[iNdEx]) - i = encodeVarintApi(dAtA, i, uint64(len(m.SupportedVersions[iNdEx]))) - i-- - dAtA[i] = 0x22 - } - } - if len(m.Endpoint) > 0 { - i -= len(m.Endpoint) - copy(dAtA[i:], m.Endpoint) - i = encodeVarintApi(dAtA, i, uint64(len(m.Endpoint))) - i-- - dAtA[i] = 0x1a - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintApi(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x12 - } - if len(m.Type) > 0 { - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintApi(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *RegistrationStatus) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RegistrationStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RegistrationStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Error) > 0 { - i -= len(m.Error) - copy(dAtA[i:], m.Error) - i = encodeVarintApi(dAtA, i, uint64(len(m.Error))) - i-- - dAtA[i] = 0x12 - } - if m.PluginRegistered { - i-- - if m.PluginRegistered { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *RegistrationStatusResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RegistrationStatusResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RegistrationStatusResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *InfoRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *InfoRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *InfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func encodeVarintApi(dAtA []byte, offset int, v uint64) int { - offset -= sovApi(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *PluginInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Type) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) - } - l = len(m.Name) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) - } - l = len(m.Endpoint) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) - } - if len(m.SupportedVersions) > 0 { - for _, s := range m.SupportedVersions { - l = len(s) - n += 1 + l + sovApi(uint64(l)) - } - } - return n -} - -func (m *RegistrationStatus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.PluginRegistered { - n += 2 - } - l = len(m.Error) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) - } - return n -} - -func (m *RegistrationStatusResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *InfoRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func sovApi(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozApi(x uint64) (n int) { - return sovApi(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *PluginInfo) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&PluginInfo{`, - `Type:` + fmt.Sprintf("%v", this.Type) + `,`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Endpoint:` + fmt.Sprintf("%v", this.Endpoint) + `,`, - `SupportedVersions:` + fmt.Sprintf("%v", this.SupportedVersions) + `,`, - `}`, - }, "") - return s -} -func (this *RegistrationStatus) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&RegistrationStatus{`, - `PluginRegistered:` + fmt.Sprintf("%v", this.PluginRegistered) + `,`, - `Error:` + fmt.Sprintf("%v", this.Error) + `,`, - `}`, - }, "") - return s -} -func (this *RegistrationStatusResponse) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&RegistrationStatusResponse{`, - `}`, - }, "") - return s -} -func (this *InfoRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&InfoRequest{`, - `}`, - }, "") - return s -} -func valueToStringApi(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *PluginInfo) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: PluginInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PluginInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthApi - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthApi - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthApi - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthApi - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Endpoint", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthApi - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthApi - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Endpoint = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SupportedVersions", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthApi - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthApi - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SupportedVersions = append(m.SupportedVersions, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipApi(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthApi - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RegistrationStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RegistrationStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RegistrationStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PluginRegistered", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.PluginRegistered = bool(v != 0) - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthApi - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthApi - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Error = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipApi(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthApi - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RegistrationStatusResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RegistrationStatusResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RegistrationStatusResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipApi(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthApi - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *InfoRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: InfoRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: InfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipApi(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthApi - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipApi(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowApi - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowApi - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowApi - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthApi - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupApi - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthApi - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} +var file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1beta1_api_proto_rawDesc = string([]byte{ + 0x0a, 0x48, 0x73, 0x74, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x2f, 0x73, 0x72, 0x63, 0x2f, 0x6b, 0x38, + 0x73, 0x2e, 0x69, 0x6f, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x6c, 0x65, 0x74, 0x2f, 0x70, 0x6b, 0x67, + 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x72, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2f, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x70, 0x6c, 0x75, 0x67, + 0x69, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x7f, + 0x0a, 0x0a, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x12, 0x2d, 0x0a, 0x12, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x73, 0x75, + 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, + 0x57, 0x0a, 0x12, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, + 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x10, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, + 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x1c, 0x0a, 0x1a, 0x52, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0d, 0x0a, 0x0b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x32, 0xd2, 0x01, 0x0a, 0x0c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4c, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, + 0x6f, 0x12, 0x1f, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x49, 0x6e, + 0x66, 0x6f, 0x22, 0x00, 0x12, 0x74, 0x0a, 0x18, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x52, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x26, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x1a, 0x2e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, + 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x34, 0x5a, 0x32, 0x6b, 0x38, + 0x73, 0x2e, 0x69, 0x6f, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x6c, 0x65, 0x74, 0x2f, 0x70, 0x6b, 0x67, + 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x72, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +}) var ( - ErrInvalidLengthApi = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowApi = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupApi = fmt.Errorf("proto: unexpected end of group") + file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1beta1_api_proto_rawDescOnce sync.Once + file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1beta1_api_proto_rawDescData []byte ) + +func file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1beta1_api_proto_rawDescGZIP() []byte { + file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1beta1_api_proto_rawDescOnce.Do(func() { + file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1beta1_api_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1beta1_api_proto_rawDesc), len(file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1beta1_api_proto_rawDesc))) + }) + return file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1beta1_api_proto_rawDescData +} + +var file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1beta1_api_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1beta1_api_proto_goTypes = []any{ + (*PluginInfo)(nil), // 0: pluginregistration.PluginInfo + (*RegistrationStatus)(nil), // 1: pluginregistration.RegistrationStatus + (*RegistrationStatusResponse)(nil), // 2: pluginregistration.RegistrationStatusResponse + (*InfoRequest)(nil), // 3: pluginregistration.InfoRequest +} +var file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1beta1_api_proto_depIdxs = []int32{ + 3, // 0: pluginregistration.Registration.GetInfo:input_type -> pluginregistration.InfoRequest + 1, // 1: pluginregistration.Registration.NotifyRegistrationStatus:input_type -> pluginregistration.RegistrationStatus + 0, // 2: pluginregistration.Registration.GetInfo:output_type -> pluginregistration.PluginInfo + 2, // 3: pluginregistration.Registration.NotifyRegistrationStatus:output_type -> pluginregistration.RegistrationStatusResponse + 2, // [2:4] is the sub-list for method output_type + 0, // [0:2] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1beta1_api_proto_init() } +func file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1beta1_api_proto_init() { + if File_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1beta1_api_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1beta1_api_proto_rawDesc), len(file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1beta1_api_proto_rawDesc)), + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1beta1_api_proto_goTypes, + DependencyIndexes: file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1beta1_api_proto_depIdxs, + MessageInfos: file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1beta1_api_proto_msgTypes, + }.Build() + File_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1beta1_api_proto = out.File + file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1beta1_api_proto_goTypes = nil + file_staging_src_k8s_io_kubelet_pkg_apis_pluginregistration_v1beta1_api_proto_depIdxs = nil +} diff --git a/pkg/apis/pluginregistration/v1beta1/api.proto b/pkg/apis/pluginregistration/v1beta1/api.proto index a2ffe66..bdd9ae9 100644 --- a/pkg/apis/pluginregistration/v1beta1/api.proto +++ b/pkg/apis/pluginregistration/v1beta1/api.proto @@ -4,16 +4,6 @@ syntax = "proto3"; package pluginregistration; // This should have been v1beta1. option go_package = "k8s.io/kubelet/pkg/apis/pluginregistration/v1beta1"; -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.stringer_all) = true; -option (gogoproto.goproto_getters_all) = true; -option (gogoproto.marshaler_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.goproto_unrecognized_all) = false; - // PluginInfo is the message sent from a plugin to the Kubelet pluginwatcher for plugin registration message PluginInfo { // Type of the Plugin. CSIPlugin or DevicePlugin diff --git a/pkg/apis/pluginregistration/v1beta1/api_grpc.pb.go b/pkg/apis/pluginregistration/v1beta1/api_grpc.pb.go new file mode 100644 index 0000000..65192fe --- /dev/null +++ b/pkg/apis/pluginregistration/v1beta1/api_grpc.pb.go @@ -0,0 +1,181 @@ +/* +Copyright 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. +*/ + +// To regenerate api.pb.go run `hack/update-codegen.sh protobindings` + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc v4.23.4 +// source: staging/src/k8s.io/kubelet/pkg/apis/pluginregistration/v1beta1/api.proto + +package v1beta1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + Registration_GetInfo_FullMethodName = "/pluginregistration.Registration/GetInfo" + Registration_NotifyRegistrationStatus_FullMethodName = "/pluginregistration.Registration/NotifyRegistrationStatus" +) + +// RegistrationClient is the client API for Registration service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Registration is the service advertised by the Plugins. +type RegistrationClient interface { + GetInfo(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*PluginInfo, error) + NotifyRegistrationStatus(ctx context.Context, in *RegistrationStatus, opts ...grpc.CallOption) (*RegistrationStatusResponse, error) +} + +type registrationClient struct { + cc grpc.ClientConnInterface +} + +func NewRegistrationClient(cc grpc.ClientConnInterface) RegistrationClient { + return ®istrationClient{cc} +} + +func (c *registrationClient) GetInfo(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*PluginInfo, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(PluginInfo) + err := c.cc.Invoke(ctx, Registration_GetInfo_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *registrationClient) NotifyRegistrationStatus(ctx context.Context, in *RegistrationStatus, opts ...grpc.CallOption) (*RegistrationStatusResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(RegistrationStatusResponse) + err := c.cc.Invoke(ctx, Registration_NotifyRegistrationStatus_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// RegistrationServer is the server API for Registration service. +// All implementations must embed UnimplementedRegistrationServer +// for forward compatibility. +// +// Registration is the service advertised by the Plugins. +type RegistrationServer interface { + GetInfo(context.Context, *InfoRequest) (*PluginInfo, error) + NotifyRegistrationStatus(context.Context, *RegistrationStatus) (*RegistrationStatusResponse, error) + mustEmbedUnimplementedRegistrationServer() +} + +// UnimplementedRegistrationServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedRegistrationServer struct{} + +func (UnimplementedRegistrationServer) GetInfo(context.Context, *InfoRequest) (*PluginInfo, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetInfo not implemented") +} +func (UnimplementedRegistrationServer) NotifyRegistrationStatus(context.Context, *RegistrationStatus) (*RegistrationStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method NotifyRegistrationStatus not implemented") +} +func (UnimplementedRegistrationServer) mustEmbedUnimplementedRegistrationServer() {} +func (UnimplementedRegistrationServer) testEmbeddedByValue() {} + +// UnsafeRegistrationServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to RegistrationServer will +// result in compilation errors. +type UnsafeRegistrationServer interface { + mustEmbedUnimplementedRegistrationServer() +} + +func RegisterRegistrationServer(s grpc.ServiceRegistrar, srv RegistrationServer) { + // If the following call pancis, it indicates UnimplementedRegistrationServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&Registration_ServiceDesc, srv) +} + +func _Registration_GetInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(InfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RegistrationServer).GetInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Registration_GetInfo_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RegistrationServer).GetInfo(ctx, req.(*InfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Registration_NotifyRegistrationStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RegistrationStatus) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RegistrationServer).NotifyRegistrationStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Registration_NotifyRegistrationStatus_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RegistrationServer).NotifyRegistrationStatus(ctx, req.(*RegistrationStatus)) + } + return interceptor(ctx, in, info, handler) +} + +// Registration_ServiceDesc is the grpc.ServiceDesc for Registration service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Registration_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "pluginregistration.Registration", + HandlerType: (*RegistrationServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetInfo", + Handler: _Registration_GetInfo_Handler, + }, + { + MethodName: "NotifyRegistrationStatus", + Handler: _Registration_NotifyRegistrationStatus_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "staging/src/k8s.io/kubelet/pkg/apis/pluginregistration/v1beta1/api.proto", +}