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