CCF
Loading...
Searching...
No Matches
retired_nodes_cleanup.h
Go to the documentation of this file.
1// Copyright (c) Microsoft Corporation. All rights reserved.
2// Licensed under the Apache 2.0 License.
3#pragma once
4
5#include "node_client.h"
6#include "tasks/basic_task.h"
7#include "tasks/task_system.h"
8
9namespace ccf
10{
12 {
13 private:
14 std::shared_ptr<NodeClient> node_client;
15
16 public:
17 RetiredNodeCleanup(const std::shared_ptr<NodeClient>& node_client_) :
18 node_client(node_client_)
19 {}
20
22 {
23 ::http::Request request(
24 fmt::format(
25 "/{}/{}",
27 "network/nodes/set_retired_committed"),
28 HTTP_POST);
29 request.set_header(http::headers::CONTENT_LENGTH, fmt::format("{}", 0));
30
31 node_client->make_request(request);
32 }
33
39 };
40}
Definition retired_nodes_cleanup.h:12
void send_cleanup_retired_nodes()
Definition retired_nodes_cleanup.h:21
RetiredNodeCleanup(const std::shared_ptr< NodeClient > &node_client_)
Definition retired_nodes_cleanup.h:17
void cleanup()
Definition retired_nodes_cleanup.h:34
void set_header(std::string k, const std::string &v)
Definition http_builder.h:45
Definition http_builder.h:117
Task make_basic_task(Ts &&... ts)
Definition basic_task.h:33
void add_task(Task task)
Definition task_system.cpp:65
Definition app_interface.h:14
constexpr auto get_actor_prefix(ActorsType at)
Definition actors.h:24