From 2bc53070db770ea06498e181ec43eb20dca194e0 Mon Sep 17 00:00:00 2001 From: Prasanna Kumar Kalever Date: Tue, 8 Feb 2022 16:13:29 +0530 Subject: [PATCH] Healer: add auto-generated proto file Fixes: #20 Signed-off-by: Prasanna Kumar Kalever --- healer/healer.proto | 67 +++++++ lib/go/healer/healer.pb.go | 328 ++++++++++++++++++++++++++++++++ lib/go/healer/healer_grpc.pb.go | 103 ++++++++++ 3 files changed, 498 insertions(+) create mode 100644 healer/healer.proto create mode 100644 lib/go/healer/healer.pb.go create mode 100644 lib/go/healer/healer_grpc.pb.go diff --git a/healer/healer.proto b/healer/healer.proto new file mode 100644 index 0000000..4bdd4ba --- /dev/null +++ b/healer/healer.proto @@ -0,0 +1,67 @@ +// Code generated by make; DO NOT EDIT. +syntax = "proto3"; +package healer; + +import "github.com/container-storage-interface/spec/lib/go/csi/csi.proto"; +import "google/protobuf/descriptor.proto"; + +option go_package = "github.com/csi-addons/spec/lib/go/healer"; + +// HealerNode holds the RPC method for running heal operations on the +// active (staged/published) volume. +service HealerNode { + // NodeHealer is a procedure that gets called on the CSI NodePlugin. + rpc NodeHealer (NodeHealerRequest) + returns (NodeHealerResponse) {} +} +// NodeHealerRequest contains the information needed to identify the +// location where the volume is mounted so that local filesystem or +// block-device operations to heal volume can be executed. +message NodeHealerRequest { + // The ID of the volume. This field is REQUIRED. + string volume_id = 1; + + // The path on which volume is available. This field is REQUIRED. + // This field overrides the general CSI size limit. + // SP SHOULD support the maximum path length allowed by the operating + // system/filesystem, but, at a minimum, SP MUST accept a max path + // length of at least 128 bytes. + string volume_path = 2; + + // The path where the volume is staged, if the plugin has the + // STAGE_UNSTAGE_VOLUME capability, otherwise empty. + // If not empty, it MUST be an absolute path in the root + // filesystem of the process serving this request. + // This field is OPTIONAL. + // This field overrides the general CSI size limit. + // SP SHOULD support the maximum path length allowed by the operating + // system/filesystem, but, at a minimum, SP MUST accept a max path + // length of at least 128 bytes. + string staging_target_path = 3; + + // Volume capability describing how the CO intends to use this volume. + // This allows SP to determine if volume is being used as a block + // device or mounted file system. For example - if volume is being + // used as a block device the SP MAY choose to skip calling filesystem + // operations to healer. If volume_capability is omitted the SP MAY + // determine access_type from given volume_path for the volume and + // perform healing. This is an OPTIONAL field. + csi.v1.VolumeCapability volume_capability = 4; + + // Secrets required by plugin to complete the healer operation. + // This field is OPTIONAL. + map secrets = 5 [(csi.v1.csi_secret) = true]; +} + +// NodeHealerResponse holds the information about the result of the +// NodeHealerRequest call. +message NodeHealerResponse { + // Normal volumes are available for use and operating optimally. + // An abnormal volume does not meet these criteria. + // This field is REQUIRED. + bool abnormal = 1; + + // The message describing the condition of the volume. + // This field is REQUIRED. + string message = 2; +} diff --git a/lib/go/healer/healer.pb.go b/lib/go/healer/healer.pb.go new file mode 100644 index 0000000..c5c3613 --- /dev/null +++ b/lib/go/healer/healer.pb.go @@ -0,0 +1,328 @@ +// Code generated by make; DO NOT EDIT. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.14.0 +// source: healer/healer.proto + +package healer + +import ( + csi "github.com/container-storage-interface/spec/lib/go/csi" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + _ "google.golang.org/protobuf/types/descriptorpb" + reflect "reflect" + sync "sync" +) + +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) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// NodeHealerRequest contains the information needed to identify the +// location where the volume is mounted so that local filesystem or +// block-device operations to heal volume can be executed. +type NodeHealerRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The ID of the volume. This field is REQUIRED. + VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId,proto3" json:"volume_id,omitempty"` + // The path on which volume is available. This field is REQUIRED. + // This field overrides the general CSI size limit. + // SP SHOULD support the maximum path length allowed by the operating + // system/filesystem, but, at a minimum, SP MUST accept a max path + // length of at least 128 bytes. + VolumePath string `protobuf:"bytes,2,opt,name=volume_path,json=volumePath,proto3" json:"volume_path,omitempty"` + // The path where the volume is staged, if the plugin has the + // STAGE_UNSTAGE_VOLUME capability, otherwise empty. + // If not empty, it MUST be an absolute path in the root + // filesystem of the process serving this request. + // This field is OPTIONAL. + // This field overrides the general CSI size limit. + // SP SHOULD support the maximum path length allowed by the operating + // system/filesystem, but, at a minimum, SP MUST accept a max path + // length of at least 128 bytes. + StagingTargetPath string `protobuf:"bytes,3,opt,name=staging_target_path,json=stagingTargetPath,proto3" json:"staging_target_path,omitempty"` + // Volume capability describing how the CO intends to use this volume. + // This allows SP to determine if volume is being used as a block + // device or mounted file system. For example - if volume is being + // used as a block device the SP MAY choose to skip calling filesystem + // operations to healer. If volume_capability is omitted the SP MAY + // determine access_type from given volume_path for the volume and + // perform healing. This is an OPTIONAL field. + VolumeCapability *csi.VolumeCapability `protobuf:"bytes,4,opt,name=volume_capability,json=volumeCapability,proto3" json:"volume_capability,omitempty"` + // Secrets required by plugin to complete the healer operation. + // This field is OPTIONAL. + Secrets map[string]string `protobuf:"bytes,5,rep,name=secrets,proto3" json:"secrets,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *NodeHealerRequest) Reset() { + *x = NodeHealerRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_healer_healer_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NodeHealerRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NodeHealerRequest) ProtoMessage() {} + +func (x *NodeHealerRequest) ProtoReflect() protoreflect.Message { + mi := &file_healer_healer_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NodeHealerRequest.ProtoReflect.Descriptor instead. +func (*NodeHealerRequest) Descriptor() ([]byte, []int) { + return file_healer_healer_proto_rawDescGZIP(), []int{0} +} + +func (x *NodeHealerRequest) GetVolumeId() string { + if x != nil { + return x.VolumeId + } + return "" +} + +func (x *NodeHealerRequest) GetVolumePath() string { + if x != nil { + return x.VolumePath + } + return "" +} + +func (x *NodeHealerRequest) GetStagingTargetPath() string { + if x != nil { + return x.StagingTargetPath + } + return "" +} + +func (x *NodeHealerRequest) GetVolumeCapability() *csi.VolumeCapability { + if x != nil { + return x.VolumeCapability + } + return nil +} + +func (x *NodeHealerRequest) GetSecrets() map[string]string { + if x != nil { + return x.Secrets + } + return nil +} + +// NodeHealerResponse holds the information about the result of the +// NodeHealerRequest call. +type NodeHealerResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Normal volumes are available for use and operating optimally. + // An abnormal volume does not meet these criteria. + // This field is REQUIRED. + Abnormal bool `protobuf:"varint,1,opt,name=abnormal,proto3" json:"abnormal,omitempty"` + // The message describing the condition of the volume. + // This field is REQUIRED. + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` +} + +func (x *NodeHealerResponse) Reset() { + *x = NodeHealerResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_healer_healer_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NodeHealerResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NodeHealerResponse) ProtoMessage() {} + +func (x *NodeHealerResponse) ProtoReflect() protoreflect.Message { + mi := &file_healer_healer_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NodeHealerResponse.ProtoReflect.Descriptor instead. +func (*NodeHealerResponse) Descriptor() ([]byte, []int) { + return file_healer_healer_proto_rawDescGZIP(), []int{1} +} + +func (x *NodeHealerResponse) GetAbnormal() bool { + if x != nil { + return x.Abnormal + } + return false +} + +func (x *NodeHealerResponse) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +var File_healer_healer_proto protoreflect.FileDescriptor + +var file_healer_healer_proto_rawDesc = []byte{ + 0x0a, 0x13, 0x68, 0x65, 0x61, 0x6c, 0x65, 0x72, 0x2f, 0x68, 0x65, 0x61, 0x6c, 0x65, 0x72, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x68, 0x65, 0x61, 0x6c, 0x65, 0x72, 0x1a, 0x40, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, + 0x6e, 0x65, 0x72, 0x2d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2d, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x66, 0x61, 0x63, 0x65, 0x2f, 0x73, 0x70, 0x65, 0x63, 0x2f, 0x6c, 0x69, 0x62, 0x2f, 0x67, + 0x6f, 0x2f, 0x63, 0x73, 0x69, 0x2f, 0x63, 0x73, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0xcb, 0x02, 0x0a, 0x11, 0x4e, 0x6f, 0x64, 0x65, 0x48, 0x65, 0x61, 0x6c, 0x65, 0x72, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x76, 0x6f, 0x6c, 0x75, 0x6d, + 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x76, 0x6f, 0x6c, 0x75, + 0x6d, 0x65, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x70, + 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x76, 0x6f, 0x6c, 0x75, 0x6d, + 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x2e, 0x0a, 0x13, 0x73, 0x74, 0x61, 0x67, 0x69, 0x6e, 0x67, + 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x11, 0x73, 0x74, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x72, 0x67, 0x65, + 0x74, 0x50, 0x61, 0x74, 0x68, 0x12, 0x45, 0x0a, 0x11, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, + 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x18, 0x2e, 0x63, 0x73, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, + 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x10, 0x76, 0x6f, 0x6c, 0x75, + 0x6d, 0x65, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x45, 0x0a, 0x07, + 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, + 0x68, 0x65, 0x61, 0x6c, 0x65, 0x72, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x48, 0x65, 0x61, 0x6c, 0x65, + 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x03, 0x98, 0x42, 0x01, 0x52, 0x07, 0x73, 0x65, 0x63, 0x72, + 0x65, 0x74, 0x73, 0x1a, 0x3a, 0x0a, 0x0c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, + 0x4a, 0x0a, 0x12, 0x4e, 0x6f, 0x64, 0x65, 0x48, 0x65, 0x61, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x62, 0x6e, 0x6f, 0x72, 0x6d, 0x61, + 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x61, 0x62, 0x6e, 0x6f, 0x72, 0x6d, 0x61, + 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, 0x53, 0x0a, 0x0a, 0x48, + 0x65, 0x61, 0x6c, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x45, 0x0a, 0x0a, 0x4e, 0x6f, 0x64, + 0x65, 0x48, 0x65, 0x61, 0x6c, 0x65, 0x72, 0x12, 0x19, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x65, 0x72, + 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x48, 0x65, 0x61, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x65, 0x72, 0x2e, 0x4e, 0x6f, 0x64, 0x65, + 0x48, 0x65, 0x61, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x42, 0x2a, 0x5a, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, + 0x73, 0x69, 0x2d, 0x61, 0x64, 0x64, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x70, 0x65, 0x63, 0x2f, 0x6c, + 0x69, 0x62, 0x2f, 0x67, 0x6f, 0x2f, 0x68, 0x65, 0x61, 0x6c, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_healer_healer_proto_rawDescOnce sync.Once + file_healer_healer_proto_rawDescData = file_healer_healer_proto_rawDesc +) + +func file_healer_healer_proto_rawDescGZIP() []byte { + file_healer_healer_proto_rawDescOnce.Do(func() { + file_healer_healer_proto_rawDescData = protoimpl.X.CompressGZIP(file_healer_healer_proto_rawDescData) + }) + return file_healer_healer_proto_rawDescData +} + +var file_healer_healer_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_healer_healer_proto_goTypes = []interface{}{ + (*NodeHealerRequest)(nil), // 0: healer.NodeHealerRequest + (*NodeHealerResponse)(nil), // 1: healer.NodeHealerResponse + nil, // 2: healer.NodeHealerRequest.SecretsEntry + (*csi.VolumeCapability)(nil), // 3: csi.v1.VolumeCapability +} +var file_healer_healer_proto_depIdxs = []int32{ + 3, // 0: healer.NodeHealerRequest.volume_capability:type_name -> csi.v1.VolumeCapability + 2, // 1: healer.NodeHealerRequest.secrets:type_name -> healer.NodeHealerRequest.SecretsEntry + 0, // 2: healer.HealerNode.NodeHealer:input_type -> healer.NodeHealerRequest + 1, // 3: healer.HealerNode.NodeHealer:output_type -> healer.NodeHealerResponse + 3, // [3:4] is the sub-list for method output_type + 2, // [2:3] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_healer_healer_proto_init() } +func file_healer_healer_proto_init() { + if File_healer_healer_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_healer_healer_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NodeHealerRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_healer_healer_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NodeHealerResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_healer_healer_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_healer_healer_proto_goTypes, + DependencyIndexes: file_healer_healer_proto_depIdxs, + MessageInfos: file_healer_healer_proto_msgTypes, + }.Build() + File_healer_healer_proto = out.File + file_healer_healer_proto_rawDesc = nil + file_healer_healer_proto_goTypes = nil + file_healer_healer_proto_depIdxs = nil +} diff --git a/lib/go/healer/healer_grpc.pb.go b/lib/go/healer/healer_grpc.pb.go new file mode 100644 index 0000000..4f8a9b4 --- /dev/null +++ b/lib/go/healer/healer_grpc.pb.go @@ -0,0 +1,103 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package healer + +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.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// HealerNodeClient is the client API for HealerNode 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. +type HealerNodeClient interface { + // NodeHealer is a procedure that gets called on the CSI NodePlugin. + NodeHealer(ctx context.Context, in *NodeHealerRequest, opts ...grpc.CallOption) (*NodeHealerResponse, error) +} + +type healerNodeClient struct { + cc grpc.ClientConnInterface +} + +func NewHealerNodeClient(cc grpc.ClientConnInterface) HealerNodeClient { + return &healerNodeClient{cc} +} + +func (c *healerNodeClient) NodeHealer(ctx context.Context, in *NodeHealerRequest, opts ...grpc.CallOption) (*NodeHealerResponse, error) { + out := new(NodeHealerResponse) + err := c.cc.Invoke(ctx, "/healer.HealerNode/NodeHealer", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// HealerNodeServer is the server API for HealerNode service. +// All implementations must embed UnimplementedHealerNodeServer +// for forward compatibility +type HealerNodeServer interface { + // NodeHealer is a procedure that gets called on the CSI NodePlugin. + NodeHealer(context.Context, *NodeHealerRequest) (*NodeHealerResponse, error) + mustEmbedUnimplementedHealerNodeServer() +} + +// UnimplementedHealerNodeServer must be embedded to have forward compatible implementations. +type UnimplementedHealerNodeServer struct { +} + +func (UnimplementedHealerNodeServer) NodeHealer(context.Context, *NodeHealerRequest) (*NodeHealerResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method NodeHealer not implemented") +} +func (UnimplementedHealerNodeServer) mustEmbedUnimplementedHealerNodeServer() {} + +// UnsafeHealerNodeServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to HealerNodeServer will +// result in compilation errors. +type UnsafeHealerNodeServer interface { + mustEmbedUnimplementedHealerNodeServer() +} + +func RegisterHealerNodeServer(s grpc.ServiceRegistrar, srv HealerNodeServer) { + s.RegisterService(&HealerNode_ServiceDesc, srv) +} + +func _HealerNode_NodeHealer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(NodeHealerRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HealerNodeServer).NodeHealer(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/healer.HealerNode/NodeHealer", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HealerNodeServer).NodeHealer(ctx, req.(*NodeHealerRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// HealerNode_ServiceDesc is the grpc.ServiceDesc for HealerNode service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var HealerNode_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "healer.HealerNode", + HandlerType: (*HealerNodeServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "NodeHealer", + Handler: _HealerNode_NodeHealer_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "healer/healer.proto", +}