mirror of
https://github.com/Telecominfraproject/wlan-cloud-ucentralfms.git
synced 2026-01-08 21:11:29 +00:00
Initial
This commit is contained in:
@@ -59,12 +59,13 @@ namespace uCentral::FWManager {
|
||||
S3Key_ = uCentral::ServiceConfig::GetString("s3.key");
|
||||
S3Retry_ = uCentral::ServiceConfig::GetInt("s3.retry",60);
|
||||
|
||||
AwsConfig_ = std::make_unique<Aws::Client::ClientConfiguration>();
|
||||
if(!S3Region_.empty())
|
||||
AwsConfig_.region = S3Region_;
|
||||
|
||||
AwsCreds_.SetAWSAccessKeyId(S3Key_.c_str());
|
||||
AwsCreds_.SetAWSSecretKey(S3Secret_.c_str());
|
||||
S3Client_ = std::make_unique<Aws::S3::S3Client>(AwsCreds_,AwsConfig_);
|
||||
AwsConfig_->region = S3Region_;
|
||||
AwsCreds_ = std::make_unique<Aws::Auth::AWSCredentials>();
|
||||
AwsCreds_->SetAWSAccessKeyId(S3Key_.c_str());
|
||||
AwsCreds_->SetAWSSecretKey(S3Secret_.c_str());
|
||||
S3Client_ = std::make_unique<Aws::S3::S3Client>(*AwsCreds_,*AwsConfig_);
|
||||
|
||||
Logger_.information("Starting ");
|
||||
Worker_.start(*this);
|
||||
|
||||
@@ -51,9 +51,9 @@ class Service : public uSubSystemServer, Poco::Runnable {
|
||||
std::string S3Key_;
|
||||
std::string S3Secret_;
|
||||
uint64_t S3Retry_;
|
||||
Aws::Client::ClientConfiguration AwsConfig_;
|
||||
Aws::Auth::AWSCredentials AwsCreds_;
|
||||
std::unique_ptr<Aws::S3::S3Client> S3Client_;
|
||||
std::unique_ptr<Aws::Client::ClientConfiguration> AwsConfig_;
|
||||
std::unique_ptr<Aws::Auth::AWSCredentials> AwsCreds_;
|
||||
std::unique_ptr<Aws::S3::S3Client> S3Client_;
|
||||
|
||||
int Start() override;
|
||||
void Stop() override;
|
||||
|
||||
Reference in New Issue
Block a user