diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 6ac7a41..8ea6e61 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -96,15 +96,7 @@ jobs: name: Check generated files runs-on: ubuntu-latest steps: - - name: Setup envs - run: | - echo GOPATH=$GITHUB_WORKSPACE >> $GITHUB_ENV - echo GO111MODULE=on >> $GITHUB_ENV - echo $GITHUB_WORKSPACE/bin >> $GITHUB_PATH - - name: Check out code - uses: actions/checkout@v2 - with: - path: ${{ github.workspace }}/src/github.com/${{ github.repository }} + - uses: actions/checkout@v2 - uses: arduino/setup-protoc@master with: version: '3.14.0' @@ -113,11 +105,9 @@ jobs: go-version: 1.18.1 - name: Generate files run: go generate ./... - working-directory: ${{ github.workspace }}/src/github.com/${{ github.repository }} - name: Check for changes in generated code run: | git diff -- '*.pb.go' || (echo "Rerun go generate ./... locally and resubmit" && exit -1) - working-directory: ${{ github.workspace }}/src/github.com/${{ github.repository }} excludereplace: name: Exclude replace in go.mod diff --git a/pkg/api/dns/dns.pb.go b/pkg/api/dns/dns.pb.go index fa06dbb..b04bd8e 100644 --- a/pkg/api/dns/dns.pb.go +++ b/pkg/api/dns/dns.pb.go @@ -25,13 +25,11 @@ package dns import ( context "context" - networkservice "github.com/networkservicemesh/api/pkg/api/networkservice" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - emptypb "google.golang.org/protobuf/types/known/emptypb" reflect "reflect" sync "sync" ) @@ -99,7 +97,7 @@ type DNSRequest struct { Type Type `protobuf:"varint,1,opt,name=type,proto3,enum=dns.Type" json:"type,omitempty"` Labels map[string]string `protobuf:"bytes,2,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Ips []string `protobuf:"bytes,3,rep,name=ips,proto3" json:"ips,omitempty"` + Ip string `protobuf:"bytes,3,opt,name=ip,proto3" json:"ip,omitempty"` } func (x *DNSRequest) Reset() { @@ -148,11 +146,11 @@ func (x *DNSRequest) GetLabels() map[string]string { return nil } -func (x *DNSRequest) GetIps() []string { +func (x *DNSRequest) GetIp() string { if x != nil { - return x.Ips + return x.Ip } - return nil + return "" } type DNSResponse struct { @@ -160,7 +158,7 @@ type DNSResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Names []string `protobuf:"bytes,1,rep,name=names,proto3" json:"names,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` } func (x *DNSResponse) Reset() { @@ -195,103 +193,41 @@ func (*DNSResponse) Descriptor() ([]byte, []int) { return file_dns_proto_rawDescGZIP(), []int{1} } -func (x *DNSResponse) GetNames() []string { +func (x *DNSResponse) GetName() string { if x != nil { - return x.Names - } - return nil -} - -type Configs struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Configs []*networkservice.DNSConfig `protobuf:"bytes,1,rep,name=configs,proto3" json:"configs,omitempty"` -} - -func (x *Configs) Reset() { - *x = Configs{} - if protoimpl.UnsafeEnabled { - mi := &file_dns_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + return x.Name } -} - -func (x *Configs) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Configs) ProtoMessage() {} - -func (x *Configs) ProtoReflect() protoreflect.Message { - mi := &file_dns_proto_msgTypes[2] - 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 Configs.ProtoReflect.Descriptor instead. -func (*Configs) Descriptor() ([]byte, []int) { - return file_dns_proto_rawDescGZIP(), []int{2} -} - -func (x *Configs) GetConfigs() []*networkservice.DNSConfig { - if x != nil { - return x.Configs - } - return nil + return "" } var File_dns_proto protoreflect.FileDescriptor var file_dns_proto_rawDesc = []byte{ 0x0a, 0x09, 0x64, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x64, 0x6e, 0x73, - 0x1a, 0x50, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x74, - 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6e, 0x65, 0x74, 0x77, - 0x6f, 0x72, 0x6b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0xad, 0x01, 0x0a, 0x0a, 0x44, 0x4e, 0x53, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, - 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x64, - 0x6e, 0x73, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x33, 0x0a, - 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, - 0x64, 0x6e, 0x73, 0x2e, 0x44, 0x4e, 0x53, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4c, - 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, - 0x6c, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x70, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x03, 0x69, 0x70, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, - 0x23, 0x0a, 0x0b, 0x44, 0x4e, 0x53, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, - 0x0a, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x22, 0x41, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x12, - 0x36, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x63, 0x6f, 0x6e, - 0x74, 0x65, 0x78, 0x74, 0x2e, 0x44, 0x4e, 0x53, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x07, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x2a, 0x2f, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x0d, 0x0a, 0x09, 0x55, 0x4e, 0x44, 0x45, 0x46, 0x49, 0x4e, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a, - 0x0a, 0x06, 0x41, 0x53, 0x53, 0x49, 0x47, 0x4e, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x55, 0x4e, - 0x41, 0x53, 0x53, 0x49, 0x47, 0x4e, 0x10, 0x02, 0x32, 0x71, 0x0a, 0x03, 0x44, 0x4e, 0x53, 0x12, - 0x34, 0x0a, 0x0c, 0x46, 0x65, 0x74, 0x63, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x12, - 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x0c, 0x2e, 0x64, 0x6e, 0x73, 0x2e, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x73, 0x12, 0x34, 0x0a, 0x0b, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x4e, - 0x61, 0x6d, 0x65, 0x73, 0x12, 0x0f, 0x2e, 0x64, 0x6e, 0x73, 0x2e, 0x44, 0x4e, 0x53, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x64, 0x6e, 0x73, 0x2e, 0x44, 0x4e, 0x53, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x42, 0x2f, 0x5a, 0x2d, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, - 0x6b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x6e, 0x73, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x22, 0xab, 0x01, 0x0a, 0x0a, 0x44, 0x4e, 0x53, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x1d, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, + 0x64, 0x6e, 0x73, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x33, + 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, + 0x2e, 0x64, 0x6e, 0x73, 0x2e, 0x44, 0x4e, 0x53, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, + 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, + 0x65, 0x6c, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x70, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x21, + 0x0a, 0x0b, 0x44, 0x4e, 0x53, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x2a, 0x2f, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x55, 0x4e, 0x44, + 0x45, 0x46, 0x49, 0x4e, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x53, 0x53, 0x49, + 0x47, 0x4e, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x55, 0x4e, 0x41, 0x53, 0x53, 0x49, 0x47, 0x4e, + 0x10, 0x02, 0x32, 0x3b, 0x0a, 0x03, 0x44, 0x4e, 0x53, 0x12, 0x34, 0x0a, 0x0b, 0x4d, 0x61, 0x6e, + 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x0f, 0x2e, 0x64, 0x6e, 0x73, 0x2e, 0x44, + 0x4e, 0x53, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x64, 0x6e, 0x73, 0x2e, + 0x44, 0x4e, 0x53, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x42, + 0x2f, 0x5a, 0x2d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x6e, 0x73, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -307,29 +243,23 @@ func file_dns_proto_rawDescGZIP() []byte { } var file_dns_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_dns_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_dns_proto_msgTypes = make([]protoimpl.MessageInfo, 3) var file_dns_proto_goTypes = []interface{}{ - (Type)(0), // 0: dns.Type - (*DNSRequest)(nil), // 1: dns.DNSRequest - (*DNSResponse)(nil), // 2: dns.DNSResponse - (*Configs)(nil), // 3: dns.Configs - nil, // 4: dns.DNSRequest.LabelsEntry - (*networkservice.DNSConfig)(nil), // 5: connectioncontext.DNSConfig - (*emptypb.Empty)(nil), // 6: google.protobuf.Empty + (Type)(0), // 0: dns.Type + (*DNSRequest)(nil), // 1: dns.DNSRequest + (*DNSResponse)(nil), // 2: dns.DNSResponse + nil, // 3: dns.DNSRequest.LabelsEntry } var file_dns_proto_depIdxs = []int32{ 0, // 0: dns.DNSRequest.type:type_name -> dns.Type - 4, // 1: dns.DNSRequest.labels:type_name -> dns.DNSRequest.LabelsEntry - 5, // 2: dns.Configs.configs:type_name -> connectioncontext.DNSConfig - 6, // 3: dns.DNS.FetchConfigs:input_type -> google.protobuf.Empty - 1, // 4: dns.DNS.ManageNames:input_type -> dns.DNSRequest - 3, // 5: dns.DNS.FetchConfigs:output_type -> dns.Configs - 2, // 6: dns.DNS.ManageNames:output_type -> dns.DNSResponse - 5, // [5:7] is the sub-list for method output_type - 3, // [3:5] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 3, // 1: dns.DNSRequest.labels:type_name -> dns.DNSRequest.LabelsEntry + 1, // 2: dns.DNS.ManageNames:input_type -> dns.DNSRequest + 2, // 3: dns.DNS.ManageNames:output_type -> dns.DNSResponse + 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_dns_proto_init() } @@ -362,18 +292,6 @@ func file_dns_proto_init() { return nil } } - file_dns_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Configs); 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{ @@ -381,7 +299,7 @@ func file_dns_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_dns_proto_rawDesc, NumEnums: 1, - NumMessages: 4, + NumMessages: 3, NumExtensions: 0, NumServices: 1, }, @@ -408,7 +326,6 @@ const _ = grpc.SupportPackageIsVersion6 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type DNSClient interface { - FetchConfigs(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*Configs, error) ManageNames(ctx context.Context, opts ...grpc.CallOption) (DNS_ManageNamesClient, error) } @@ -420,15 +337,6 @@ func NewDNSClient(cc grpc.ClientConnInterface) DNSClient { return &dNSClient{cc} } -func (c *dNSClient) FetchConfigs(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*Configs, error) { - out := new(Configs) - err := c.cc.Invoke(ctx, "/dns.DNS/FetchConfigs", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *dNSClient) ManageNames(ctx context.Context, opts ...grpc.CallOption) (DNS_ManageNamesClient, error) { stream, err := c.cc.NewStream(ctx, &_DNS_serviceDesc.Streams[0], "/dns.DNS/ManageNames", opts...) if err != nil { @@ -462,7 +370,6 @@ func (x *dNSManageNamesClient) Recv() (*DNSResponse, error) { // DNSServer is the server API for DNS service. type DNSServer interface { - FetchConfigs(context.Context, *emptypb.Empty) (*Configs, error) ManageNames(DNS_ManageNamesServer) error } @@ -470,9 +377,6 @@ type DNSServer interface { type UnimplementedDNSServer struct { } -func (*UnimplementedDNSServer) FetchConfigs(context.Context, *emptypb.Empty) (*Configs, error) { - return nil, status.Errorf(codes.Unimplemented, "method FetchConfigs not implemented") -} func (*UnimplementedDNSServer) ManageNames(DNS_ManageNamesServer) error { return status.Errorf(codes.Unimplemented, "method ManageNames not implemented") } @@ -481,24 +385,6 @@ func RegisterDNSServer(s *grpc.Server, srv DNSServer) { s.RegisterService(&_DNS_serviceDesc, srv) } -func _DNS_FetchConfigs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(emptypb.Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DNSServer).FetchConfigs(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/dns.DNS/FetchConfigs", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DNSServer).FetchConfigs(ctx, req.(*emptypb.Empty)) - } - return interceptor(ctx, in, info, handler) -} - func _DNS_ManageNames_Handler(srv interface{}, stream grpc.ServerStream) error { return srv.(DNSServer).ManageNames(&dNSManageNamesServer{stream}) } @@ -528,12 +414,7 @@ func (x *dNSManageNamesServer) Recv() (*DNSRequest, error) { var _DNS_serviceDesc = grpc.ServiceDesc{ ServiceName: "dns.DNS", HandlerType: (*DNSServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "FetchConfigs", - Handler: _DNS_FetchConfigs_Handler, - }, - }, + Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "ManageNames", diff --git a/pkg/api/dns/dns.proto b/pkg/api/dns/dns.proto index d8feea9..0550e2b 100644 --- a/pkg/api/dns/dns.proto +++ b/pkg/api/dns/dns.proto @@ -20,9 +20,6 @@ syntax = "proto3"; package dns; option go_package = "github.com/networkservicemesh/api/pkg/api/dns"; -import "github.com/networkservicemesh/api/pkg/api/networkservice/connectioncontext.proto"; -import "google/protobuf/empty.proto"; - enum Type { UNDEFINED = 0; ASSIGN = 1; @@ -32,18 +29,13 @@ enum Type { message DNSRequest { Type type = 1; map labels = 2; - repeated string ips = 3; + string ip = 3; } message DNSResponse { - repeated string names = 1; -} - -message Configs { - repeated connectioncontext.DNSConfig configs = 1; + string name = 1; } -service DNS { - rpc FetchConfigs(google.protobuf.Empty) returns (Configs); +service DNS { rpc ManageNames (stream DNSRequest) returns (stream DNSResponse); } \ No newline at end of file