Until now, all changes to `system.view_build_status_v2` were made from view.cc and the file contained all of the helper methods. This commit introduces a `build_status` enum class to avoid using hardcoded strings and extracts the helper methods to `system_keyspace` class, so they can be later used by the view building coordinator.
29 lines
417 B
C++
29 lines
417 B
C++
/*
|
|
* Copyright (C) 2025-present ScyllaDB
|
|
*/
|
|
|
|
/*
|
|
* SPDX-License-Identifier: LicenseRef-ScyllaDB-Source-Available-1.0
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <string_view>
|
|
#include <seastar/core/sstring.hh>
|
|
|
|
namespace db {
|
|
|
|
namespace view {
|
|
|
|
enum class build_status {
|
|
STARTED,
|
|
SUCCESS,
|
|
};
|
|
|
|
build_status build_status_from_string(std::string_view str);
|
|
seastar::sstring build_status_to_sstring(build_status status);
|
|
|
|
}
|
|
|
|
}
|