CCF
Loading...
Searching...
No Matches
include
ccf
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
5
#include "
ccf/common_endpoint_registry.h
"
6
#include "
ccf/node_context.h
"
7
8
#include <memory>
9
#include <vector>
10
11
// Forward declarations, can be removed with deprecation
12
namespace
ccf
13
{
14
class
RpcFrontend
;
15
}
16
17
namespace
ccf::kv
18
{
19
class
Store
;
20
}
21
22
namespace
ccf
23
{
24
class
UserEndpointRegistry
:
public
CommonEndpointRegistry
25
{
26
public
:
27
UserEndpointRegistry
(
ccf::AbstractNodeContext
&
context
);
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.
31
void
handle_event_request_completed
(
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
37
void
handle_event_dispatch_failed
(
38
const
ccf::endpoints::DispatchFailedEvent
& event)
override
;
39
};
40
}
41
42
namespace
ccf
43
{
44
// SNIPPET_START: app_interface
52
std::unique_ptr<ccf::endpoints::EndpointRegistry>
make_user_endpoints
(
53
ccf::AbstractNodeContext
& context);
54
// SNIPPET_END: app_interface
55
}
ccf::BaseEndpointRegistry::context
ccf::AbstractNodeContext & context
Definition
base_endpoint_registry.h:123
ccf::CommonEndpointRegistry
Definition
common_endpoint_registry.h:16
ccf::RpcFrontend
Definition
frontend.h:35
ccf::UserEndpointRegistry
Definition
app_interface.h:25
ccf::UserEndpointRegistry::handle_event_dispatch_failed
void handle_event_dispatch_failed(const ccf::endpoints::DispatchFailedEvent &event) override
Definition
user_endpoint_registry.cpp:19
ccf::UserEndpointRegistry::handle_event_request_completed
void handle_event_request_completed(const ccf::endpoints::RequestCompletedEvent &event) override
Definition
user_endpoint_registry.cpp:15
ccf::kv::Store
Definition
store.h:88
common_endpoint_registry.h
ccf::kv
Definition
app_interface.h:18
ccf
Definition
app_interface.h:13
ccf::make_user_endpoints
std::unique_ptr< ccf::endpoints::EndpointRegistry > make_user_endpoints(ccf::AbstractNodeContext &context)
Definition
js_generic.cpp:9
node_context.h
ccf::AbstractNodeContext
Definition
node_context.h:12
ccf::endpoints::DispatchFailedEvent
Definition
endpoint_registry.h:61
ccf::endpoints::RequestCompletedEvent
Definition
endpoint_registry.h:48
Generated by
1.9.8