refactor endpoints implementation

This commit is contained in:
zhangzifa
2019-03-04 14:44:44 +08:00
committed by Jackson Tian
parent 563e907601
commit c17dc7c79a
8 changed files with 10040 additions and 141 deletions

View File

@@ -52,19 +52,11 @@ class ALIBABACLOUD_CORE_EXPORT EndpointProvider :
using LocationClient::describeEndpoints;
private:
struct Product {
std::string code;
std::string locationServiceCode;
std::string documentId;
std::map<std::string, std::string> regionalEndpoints;
std::string globalEndpoint;
std::string regionalEndpointPattern;
};
EndpointOutcome loadRemoteEndpoint();
bool checkExpiry()const;
bool loadInternalProductsInfo();
std::string internalEndpoint(const std::string regionId,
bool loadLocalProductsInfo();
std::string localEndpoint(const std::string regionId,
const std::string product);
std::mutex cachedMutex_;
@@ -74,7 +66,6 @@ class ALIBABACLOUD_CORE_EXPORT EndpointProvider :
std::string regionId_;
std::string product_;
std::string serviceCode_;
std::list<Product> internalProductsInfo_;
};
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_ENDPOINTPROVIDER_H_