CCF
Loading...
Searching...
No Matches
app_interface.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
7#include "ccf/node_context.h"
8
9#include <memory>
10#include <vector>
11
12// Forward declarations, can be removed with deprecation
13namespace ccf
14{
15 class RpcFrontend;
16}
17
18namespace ccf::kv
19{
20 class Store;
21}
22
23namespace ccf
24{
26 {
27 public:
29
30 // Default behaviour is to do nothing - do NOT log summary of every request
31 // as it completes. Apps may override this if they wish.
33 const ccf::endpoints::RequestCompletedEvent& event) override;
34
35 // Default behavour is to log dispatch failures, as a coarse metric of
36 // some user errors, but do not log the raw path, which may contain
37 // confidential fields misformatted into the wrong url
39 const ccf::endpoints::DispatchFailedEvent& event) override;
40 };
41}
42
43namespace ccf
44{
45 // SNIPPET_START: app_interface
53 std::unique_ptr<ccf::endpoints::EndpointRegistry> make_user_endpoints(
55 // SNIPPET_END: app_interface
56}
ccf::AbstractNodeContext & context
Definition base_endpoint_registry.h:123
Definition common_endpoint_registry.h:16
Definition frontend.h:34
Definition app_interface.h:26
void handle_event_dispatch_failed(const ccf::endpoints::DispatchFailedEvent &event) override
Definition user_endpoint_registry.cpp:19
void handle_event_request_completed(const ccf::endpoints::RequestCompletedEvent &event) override
Definition user_endpoint_registry.cpp:15
Definition store.h:88
Definition app_interface.h:19
Definition app_interface.h:14
std::unique_ptr< ccf::endpoints::EndpointRegistry > make_user_endpoints(ccf::AbstractNodeContext &context)
Definition js_generic.cpp:9
Definition node_context.h:12
Definition endpoint_registry.h:55
Definition endpoint_registry.h:42