Instead of lengthy blurbs, switch to single-line, machine-readable standardized (https://spdx.dev) license identifiers. The Linux kernel switched long ago, so there is strong precedent. Three cases are handled: AGPL-only, Apache-only, and dual licensed. For the latter case, I chose (AGPL-3.0-or-later and Apache-2.0), reasoning that our changes are extensive enough to apply our license. The changes we applied mechanically with a script, except to licenses/README.md. Closes #9937
34 lines
607 B
C++
34 lines
607 B
C++
/*
|
|
* Copyright (C) 2021-present ScyllaDB
|
|
*/
|
|
|
|
/*
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <variant>
|
|
|
|
#include "db_clock.hh"
|
|
#include "utils/UUID.hh"
|
|
|
|
namespace cdc {
|
|
|
|
struct generation_id_v1 {
|
|
db_clock::time_point ts;
|
|
};
|
|
|
|
struct generation_id_v2 {
|
|
db_clock::time_point ts;
|
|
utils::UUID id;
|
|
};
|
|
|
|
using generation_id = std::variant<generation_id_v1, generation_id_v2>;
|
|
|
|
std::ostream& operator<<(std::ostream&, const generation_id&);
|
|
bool operator==(const generation_id&, const generation_id&);
|
|
db_clock::time_point get_ts(const generation_id&);
|
|
|
|
} // namespace cdc
|