Now its plain updateable_value, but without the ..._source object the updateable_value is just a no-op value holder. In order for the observers to operate there must be the value source, updating it would update the attached updateable values _and_ notify the observers. In order for the config to be the u.v._source, config entries should be comparable to each other, thus the <=> operator for it Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
40 lines
864 B
C++
40 lines
864 B
C++
/*
|
|
* Copyright (C) 2022-present ScyllaDB
|
|
*/
|
|
|
|
/*
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <optional>
|
|
#include <seastar/core/shared_ptr.hh>
|
|
|
|
namespace s3 {
|
|
|
|
struct endpoint_config {
|
|
unsigned port;
|
|
bool use_https;
|
|
|
|
struct aws_config {
|
|
// the access key of the credentials
|
|
std::string access_key_id;
|
|
// the secret key of the credentials
|
|
std::string secret_access_key;
|
|
// the security token, only for session credentials
|
|
std::string session_token;
|
|
std::string region;
|
|
|
|
std::strong_ordering operator<=> (const aws_config& o) const = default;
|
|
};
|
|
|
|
std::optional<aws_config> aws;
|
|
|
|
std::strong_ordering operator<=> (const endpoint_config& o) const = default;
|
|
};
|
|
|
|
using endpoint_config_ptr = seastar::lw_shared_ptr<endpoint_config>;
|
|
|
|
} // s3 namespace
|