-
-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge origin/main into topic/tui-take-two
- Loading branch information
Showing
239 changed files
with
340 additions
and
227 deletions.
There are no files selected for viewing
3 changes: 0 additions & 3 deletions
3
changelog/next/changes/3377--reduce-passive-partition-cache-size.md
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Submodule tenzir-plugins
updated
from 15b3c3 to 9596f9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
// _ _____ __________ | ||
// | | / / _ | / __/_ __/ Visibility | ||
// | |/ / __ |_\ \ / / Across | ||
// |___/_/ |_/___/ /_/ Space and Time | ||
// | ||
// SPDX-FileCopyrightText: (c) 2023 The Tenzir Contributors | ||
// SPDX-License-Identifier: BSD-3-Clause | ||
|
||
#include <tenzir/builtin_rest_endpoints.hpp> | ||
#include <tenzir/plugin.hpp> | ||
#include <tenzir/version.hpp> | ||
|
||
#include <caf/typed_event_based_actor.hpp> | ||
|
||
namespace tenzir::plugins::rest_api::ping { | ||
|
||
static auto const* SPEC_V0 = R"_( | ||
/ping: | ||
post: | ||
summary: Returns a success response | ||
description: Returns a success response to indicate that the node is able to respond to requests. The response body includes the current node version. | ||
responses: | ||
200: | ||
description: OK. | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
properties: | ||
version: | ||
type: string | ||
description: The version of the responding node. | ||
example: "v2.3.0-rc3-32-g8529a6c43f" | ||
example: | ||
version: v2.3.0-rc3-32-g8529a6c43f | ||
401: | ||
description: Not authenticated. | ||
)_"; | ||
|
||
using ping_handler_actor | ||
= typed_actor_fwd<>::extend_with<rest_handler_actor>::unwrap; | ||
|
||
struct ping_handler_state { | ||
static constexpr auto name = "ping-handler"; | ||
ping_handler_state() = default; | ||
}; | ||
|
||
auto ping_handler(ping_handler_actor::stateful_pointer<ping_handler_state> self) | ||
-> ping_handler_actor::behavior_type { | ||
return { | ||
[self](atom::http_request, uint64_t, | ||
const tenzir::record&) -> caf::result<rest_response> { | ||
TENZIR_DEBUG("{} handles /ping request", *self); | ||
return rest_response{record{{{"version", tenzir::version::version}}}}; | ||
}, | ||
}; | ||
} | ||
|
||
class plugin final : public virtual rest_endpoint_plugin { | ||
auto initialize([[maybe_unused]] const record& plugin_config, | ||
[[maybe_unused]] const record& global_config) | ||
-> caf::error override { | ||
return {}; | ||
} | ||
|
||
[[nodiscard]] auto name() const -> std::string override { | ||
return "ping"; | ||
}; | ||
|
||
[[nodiscard]] auto openapi_specification(api_version version) const | ||
-> data override { | ||
if (version != api_version::v0) | ||
return tenzir::record{}; | ||
auto result = from_yaml(SPEC_V0); | ||
TENZIR_ASSERT(result); | ||
return *result; | ||
} | ||
|
||
/// List of API endpoints provided by this plugin. | ||
[[nodiscard]] auto rest_endpoints() const | ||
-> const std::vector<rest_endpoint>& override { | ||
static const auto endpoints = std::vector<rest_endpoint>{ | ||
{ | ||
.endpoint_id = static_cast<uint64_t>(0), | ||
.method = http_method::post, | ||
.path = "/ping", | ||
.params = std::nullopt, | ||
.version = api_version::v0, | ||
.content_type = http_content_type::json, | ||
}, | ||
}; | ||
return endpoints; | ||
} | ||
|
||
auto handler(caf::actor_system& system, node_actor) const | ||
-> rest_handler_actor override { | ||
return system.spawn(ping_handler); | ||
} | ||
}; | ||
|
||
} // namespace tenzir::plugins::rest_api::ping | ||
|
||
TENZIR_REGISTER_PLUGIN(tenzir::plugins::rest_api::ping::plugin) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 0 additions & 28 deletions
28
web/versioned_docs/version-Tenzir v4.0-rc8/operators/sinks/write.md
This file was deleted.
Oops, something went wrong.
28 changes: 0 additions & 28 deletions
28
web/versioned_docs/version-Tenzir v4.0-rc8/operators/sources/read.md
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.