martinzink commented on a change in pull request #1219: URL: https://github.com/apache/nifi-minifi-cpp/pull/1219#discussion_r781280878
########## File path: extensions/splunk/PutSplunkHTTP.cpp ########## @@ -0,0 +1,176 @@ +/** + * 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. + */ + + +#include "PutSplunkHTTP.h" + +#include <vector> +#include <utility> + +#include "SplunkAttributes.h" + +#include "core/Resource.h" +#include "utils/StringUtils.h" +#include "client/HTTPClient.h" +#include "utils/HTTPClient.h" +#include "utils/OptionalUtils.h" + +#include "rapidjson/document.h" + + +namespace org::apache::nifi::minifi::extensions::splunk { + +const core::Property PutSplunkHTTP::Source(core::PropertyBuilder::createProperty("Source") + ->withDescription("Basic field describing the source of the event. If unspecified, the event will use the default defined in splunk.") + ->supportsExpressionLanguage(true)->build()); + +const core::Property PutSplunkHTTP::SourceType(core::PropertyBuilder::createProperty("Source Type") + ->withDescription("Basic field describing the source type of the event. If unspecified, the event will use the default defined in splunk.") + ->supportsExpressionLanguage(true)->build()); + +const core::Property PutSplunkHTTP::Host(core::PropertyBuilder::createProperty("Host") + ->withDescription("Basic field describing the host of the event. If unspecified, the event will use the default defined in splunk.") + ->supportsExpressionLanguage(true)->build()); + +const core::Property PutSplunkHTTP::Index(core::PropertyBuilder::createProperty("Index") + ->withDescription("Identifies the index where to send the event. If unspecified, the event will use the default defined in splunk.") + ->supportsExpressionLanguage(true)->build()); + +const core::Property PutSplunkHTTP::ContentType(core::PropertyBuilder::createProperty("Content Type") + ->withDescription("The media type of the event sent to Splunk. If not set, \"mime.type\" flow file attribute will be used. " + "In case of neither of them is specified, this information will not be sent to the server.") + ->supportsExpressionLanguage(true)->build()); + + +const core::Relationship PutSplunkHTTP::Success("success", "FlowFiles that are sent successfully to the destination are sent to this relationship."); +const core::Relationship PutSplunkHTTP::Failure("failure", "FlowFiles that failed to send to the destination are sent to this relationship."); Review comment: To be honest this was a shameless copy paste from the [nifi](https://github.com/apache/nifi/blob/main/nifi-nar-bundles/nifi-splunk-bundle/nifi-splunk-processors/src/main/java/org/apache/nifi/processors/splunk/PutSplunkHTTP.java#L133) version But I agree, we should fix this https://github.com/apache/nifi-minifi-cpp/pull/1219/commits/412fa041455d782eedc52bdfb24c680ae7e56808#diff-2633ef573b024e894869a6a974a55671c3468db3eff99e4cdc646a081a700efdR60 -- 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]
