sdk/include/alibabacloud/pds/client/ClientConfiguration.h (45 lines of code) (raw):
/*
* Copyright 2009-2021 Alibaba Cloud All rights reserved.
*
* Licensed 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 <memory>
#include <string>
#include <alibabacloud/pds/auth/CredentialsProvider.h>
#include <alibabacloud/pds/http/HttpClient.h>
#include <alibabacloud/pds/utils/Executor.h>
namespace AlibabaCloud
{
namespace PDS
{
class RetryStrategy;
class RateLimiter;
class ALIBABACLOUD_PDS_EXPORT ClientConfiguration
{
public:
ClientConfiguration();
~ClientConfiguration() = default;
public:
/**
* User Agent string user for http calls.
*/
std::string userAgent;
/**
* Http scheme to use. E.g. Http or Https.
*/
Http::Scheme scheme;
/**
* Max concurrent tcp connections for a single http client to use.
*/
unsigned maxConnections;
/**
* Socket read timeouts. Default 3000 ms.
*/
long requestTimeoutMs;
/**
* Socket connect timeout.
*/
long connectTimeoutMs;
/**
* Strategy to use in case of failed requests.
*/
std::shared_ptr<RetryStrategy> retryStrategy;
/**
* The proxy scheme. Default HTTP
*/
Http::Scheme proxyScheme;
/**
* The proxy host.
*/
std::string proxyHost;
/**
* The proxy port.
*/
unsigned int proxyPort;
/**
* The proxy username.
*/
std::string proxyUserName;
/**
* The proxy password
*/
std::string proxyPassword;
/**
* set false to bypass SSL check.
*/
bool verifySSL;
/**
* your Certificate Authority path.
*/
std::string caPath;
/**
* your certificate file.
*/
std::string caFile;
/**
* your certificate file.
*/
bool isCname;
/**
* enable or disable crc64 check.
*/
bool enableCrc64;
/**
* enable or disable rapid upload.
*/
bool enableRapidUpload;
/**
* enable or disable check download file size.
*/
bool enableCheckDownloadFileSize;
/**
* enable or disable download punished file.
*/
bool enableDownloadPunishedFile;
/**
*
* Rate limit data upload speed.
*/
std::shared_ptr<RateLimiter> sendRateLimiter;
/**
* Rate limit data download speed.
*/
std::shared_ptr<RateLimiter> recvRateLimiter;
/**
* The interface for outgoing traffic. E.g. eth0 in linux
*/
std::string networkInterface;
/**
* Your executor's implement
*/
std::shared_ptr<Executor> executor;
/**
* Your http client' implement
*/
std::shared_ptr<HttpClient> httpClient;
};
}
}