szaszm commented on code in PR #2045:
URL: https://github.com/apache/nifi-minifi-cpp/pull/2045#discussion_r2580840579


##########
minifi-api/include/minifi-cpp/controllers/ProxyConfigurationServiceInterface.h:
##########
@@ -0,0 +1,42 @@
+/**
+* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+#pragma once
+
+#include "minifi-cpp/core/controller/ControllerService.h"
+#include "minifi-cpp/core/ControllerServiceApiDefinition.h"
+
+namespace org::apache::nifi::minifi::controllers {
+
+struct ProxyConfiguration {
+  std::string proxy_host;
+  std::optional<uint16_t> proxy_port;
+  std::optional<std::string> proxy_user;
+  std::optional<std::string> proxy_password;
+};

Review Comment:
   I think a getter-only interface could work. I would also add a proxy type 
getter, even if the type enum only has one possible value today, so older 
processors can detect future versions of the service that are incompatible.
   
   I think we could also do a flat struct with the first field being a type 
enum field, if the interface always returns a heap allocated object: that way 
future versions can grow the struct without breaking its layout. I'd prefer 
this approach.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to