CCF
Loading...
Searching...
No Matches
node_startup_state.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 "ccf/ds/json.h"
6
7namespace ccf
8{
19
22 {{ccf::NodeStartupState::uninitialized, "Uninitialized"},
25 {ccf::NodeStartupState::partOfPublicNetwork, "PartOfPublicNetwork"},
26 {ccf::NodeStartupState::partOfNetwork, "PartOfNetwork"},
27 {ccf::NodeStartupState::readingPublicLedger, "ReadingPublicLedger"},
28 {ccf::NodeStartupState::readingPrivateLedger, "ReadingPrivateLedger"}})
29}
30
31// Used by fmtlib to render ccf::State
32namespace std
33{
34 inline std::ostream& operator<<(std::ostream& os, ccf::NodeStartupState s)
35 {
36 nlohmann::json j;
37 to_json(j, s);
38 return os << j.dump();
39 }
40}
#define DECLARE_JSON_ENUM(TYPE,...)
Definition json.h:837
Definition app_interface.h:14
NodeStartupState
Definition node_startup_state.h:10
STL namespace.
std::ostream & operator<<(std::ostream &os, ccf::NodeStartupState s)
Definition node_startup_state.h:34
void to_json(nlohmann::json &j, const std::optional< T > &t)
Definition json.h:49