Skip to content

Commit c2fe96e

Browse files
committed
fix linter issues with .clang-format update and RemoteProcessGroupPort.h reformat
1 parent af940b4 commit c2fe96e

3 files changed

Lines changed: 39 additions & 44 deletions

File tree

.clang-format

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ AllowAllConstructorInitializersOnNextLine: false
88
AllowShortBlocksOnASingleLine: Empty
99
AllowShortCaseLabelsOnASingleLine: false
1010
AllowShortEnumsOnASingleLine: false
11-
AllowShortFunctionsOnASingleLine: Inline
11+
AllowShortFunctionsOnASingleLine: None
1212
AllowShortIfStatementsOnASingleLine: WithoutElse
1313
AllowShortLambdasOnASingleLine: All
1414
AllowShortLoopsOnASingleLine: false

libminifi/include/RemoteProcessGroupPort.h

Lines changed: 35 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -19,25 +19,25 @@
1919
*/
2020
#pragma once
2121

22+
#include <memory>
23+
#include <mutex>
24+
#include <stack>
2225
#include <string>
2326
#include <utility>
2427
#include <vector>
25-
#include <mutex>
26-
#include <memory>
27-
#include <stack>
2828

29-
#include "http/BaseHTTPClient.h"
3029
#include "concurrentqueue.h"
31-
#include "core/ProcessorImpl.h"
30+
#include "core/ClassLoader.h"
3231
#include "core/ProcessSession.h"
33-
#include "minifi-cpp/core/PropertyDefinition.h"
32+
#include "core/ProcessorImpl.h"
3433
#include "core/PropertyDefinitionBuilder.h"
35-
#include "minifi-cpp/core/RelationshipDefinition.h"
36-
#include "sitetosite/SiteToSiteClient.h"
37-
#include "minifi-cpp/controllers/SSLContextServiceInterface.h"
3834
#include "core/logging/LoggerFactory.h"
35+
#include "http/BaseHTTPClient.h"
36+
#include "minifi-cpp/controllers/SSLContextServiceInterface.h"
37+
#include "minifi-cpp/core/PropertyDefinition.h"
38+
#include "minifi-cpp/core/RelationshipDefinition.h"
3939
#include "minifi-cpp/utils/Export.h"
40-
#include "core/ClassLoader.h"
40+
#include "sitetosite/SiteToSiteClient.h"
4141

4242
namespace org::apache::nifi::minifi {
4343

@@ -49,8 +49,11 @@ struct RPG {
4949

5050
class RemoteProcessGroupPort : public core::ProcessorImpl {
5151
public:
52-
RemoteProcessGroupPort(std::string_view name, std::string url, std::shared_ptr<Configure> configure, const utils::Identifier &uuid, sitetosite::TransferDirection direction, std::shared_ptr<core::logging::Logger> logger = nullptr)
53-
: core::ProcessorImpl({.uuid = uuid, .name = std::string{name}, .logger = logger ? logger : core::logging::LoggerFactory<RemoteProcessGroupPort>::getLogger(uuid)}),
52+
RemoteProcessGroupPort(std::string_view name, std::string url, std::shared_ptr<Configure> configure, const utils::Identifier& uuid,
53+
sitetosite::TransferDirection direction, std::shared_ptr<core::logging::Logger> logger = nullptr)
54+
: core::ProcessorImpl({.uuid = uuid,
55+
.name = std::string{name},
56+
.logger = logger ? logger : core::logging::LoggerFactory<RemoteProcessGroupPort>::getLogger(uuid)}),
5457
configure_(std::move(configure)),
5558
direction_(direction),
5659
transmitting_(false),
@@ -62,32 +65,24 @@ class RemoteProcessGroupPort : public core::ProcessorImpl {
6265
}
6366
virtual ~RemoteProcessGroupPort() = default;
6467

65-
MINIFIAPI static constexpr auto hostName = core::PropertyDefinitionBuilder<>::createProperty("Host Name")
66-
.withDescription("Remote Host Name.")
67-
.build();
68-
MINIFIAPI static constexpr auto SSLContext = core::PropertyDefinitionBuilder<>::createProperty("SSL Context Service")
69-
.withDescription("The SSL Context Service used to provide client certificate information for TLS/SSL (https) connections.")
70-
.build();
71-
MINIFIAPI static constexpr auto port = core::PropertyDefinitionBuilder<>::createProperty("Port")
72-
.withDescription("Remote Port")
73-
.build();
74-
MINIFIAPI static constexpr auto portUUID = core::PropertyDefinitionBuilder<>::createProperty("Port UUID")
75-
.withDescription("Specifies remote NiFi Port UUID.")
76-
.build();
77-
MINIFIAPI static constexpr auto idleTimeout = core::PropertyDefinitionBuilder<>::createProperty("Idle Timeout")
78-
.withDescription("Max idle time for remote service")
79-
.isRequired(true)
80-
.withValidator(core::StandardPropertyValidators::TIME_PERIOD_VALIDATOR)
81-
.withDefaultValue("15 s")
82-
.build();
83-
84-
MINIFIAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({
85-
hostName,
86-
SSLContext,
87-
port,
88-
portUUID,
89-
idleTimeout
90-
});
68+
MINIFIAPI static constexpr auto hostName =
69+
core::PropertyDefinitionBuilder<>::createProperty("Host Name").withDescription("Remote Host Name.").build();
70+
MINIFIAPI static constexpr auto SSLContext =
71+
core::PropertyDefinitionBuilder<>::createProperty("SSL Context Service")
72+
.withDescription("The SSL Context Service used to provide client certificate information for TLS/SSL (https) connections.")
73+
.build();
74+
MINIFIAPI static constexpr auto port = core::PropertyDefinitionBuilder<>::createProperty("Port").withDescription("Remote Port").build();
75+
MINIFIAPI static constexpr auto portUUID =
76+
core::PropertyDefinitionBuilder<>::createProperty("Port UUID").withDescription("Specifies remote NiFi Port UUID.").build();
77+
MINIFIAPI static constexpr auto idleTimeout =
78+
core::PropertyDefinitionBuilder<>::createProperty("Idle Timeout")
79+
.withDescription("Max idle time for remote service")
80+
.isRequired(true)
81+
.withValidator(core::StandardPropertyValidators::TIME_PERIOD_VALIDATOR)
82+
.withDefaultValue("15 s")
83+
.build();
84+
85+
MINIFIAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({hostName, SSLContext, port, portUUID, idleTimeout});
9186

9287
MINIFIAPI static constexpr auto DefaultRelationship = core::RelationshipDefinition{"undefined", ""};
9388
MINIFIAPI static constexpr auto Relationships = std::array{DefaultRelationship};
@@ -115,7 +110,7 @@ class RemoteProcessGroupPort : public core::ProcessorImpl {
115110
transmitting_ = val;
116111
}
117112

118-
void setInterface(const std::string &ifc) {
113+
void setInterface(const std::string& ifc) {
119114
local_network_interface_ = ifc;
120115
}
121116

@@ -125,7 +120,7 @@ class RemoteProcessGroupPort : public core::ProcessorImpl {
125120
return nifi_instances_;
126121
}
127122

128-
void setHTTPProxy(const http::HTTPProxy &proxy) {
123+
void setHTTPProxy(const http::HTTPProxy& proxy) {
129124
proxy_ = proxy;
130125
}
131126

minifi-api/include/minifi-api.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
* limitations under the License.
1616
*/
1717

18-
#ifndef MINIFI_API_INCLUDE_MINIFI_C_MINIFI_API_H_
19-
#define MINIFI_API_INCLUDE_MINIFI_C_MINIFI_API_H_
18+
#ifndef MINIFI_API_INCLUDE_MINIFI_API_H_
19+
#define MINIFI_API_INCLUDE_MINIFI_API_H_
2020

2121
#ifdef __cplusplus
2222
extern "C" {
@@ -310,4 +310,4 @@ enum minifi_status minifi_process_context_get_proxy_data_from_property(struct mi
310310
} // extern "C"
311311
#endif // __cplusplus
312312

313-
#endif // MINIFI_API_INCLUDE_MINIFI_C_MINIFI_API_H_
313+
#endif // MINIFI_API_INCLUDE_MINIFI_API_H_

0 commit comments

Comments
 (0)