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