Hazelcast C++ Client
Hazelcast C++ Client Library
cloud_utility.h
1 /*
2  * Copyright (c) 2008-2021, Hazelcast, Inc. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 #pragma once
17 
18 #include <string>
19 #include <unordered_map>
20 #include <boost/property_tree/ptree.hpp>
21 
22 #include "hazelcast/util/export.h"
23 
24 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
25 #pragma warning(push)
26 #pragma warning(disable: 4251) //for dll export
27 #endif
28 
29 namespace pt = boost::property_tree;
30 
31 namespace hazelcast {
32  class logger;
33 
34  namespace client {
35  namespace config {
36  class client_aws_config;
37  }
38  namespace aws {
39  namespace utility {
40  class HAZELCAST_API cloud_utility {
41  public:
51  static std::unordered_map<std::string, std::string> unmarshal_the_response(std::istream &stream,
52  logger &lg);
53 
54  static void unmarshal_json_response(std::istream &stream, config::client_aws_config &aws_config,
55  std::unordered_map<std::string, std::string> &attributes);
56  };
57  }
58  }
59  }
60 }
61 
62 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
63 #pragma warning(pop)
64 #endif
65 
66 
static std::unordered_map< std::string, std::string > unmarshal_the_response(std::istream &stream, logger &lg)
Unmarshal the response from DescribeInstances and return the discovered node map.
The client_aws_config contains the configuration for client to connect to nodes in aws environment.