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/ccf_deprecated.h
"
6
#include "
ccf/common_endpoint_registry.h
"
7
#include "
ccf/node_context.h
"
8
9
#include <memory>
10
#include <vector>
11
12
// Forward declarations, can be removed with deprecation
13
namespace
ccf
14
{
15
class
RpcFrontend
;
16
}
17
18
namespace
ccf::kv
19
{
20
class
Store
;
21
}
22
23
namespace
ccf
24
{
25
class
UserEndpointRegistry
:
public
CommonEndpointRegistry
26
{
27
public
:
28
UserEndpointRegistry
(
ccf::AbstractNodeContext
&
context
);
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.
32
void
handle_event_request_completed
(
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
38
void
handle_event_dispatch_failed
(
39
const
ccf::endpoints::DispatchFailedEvent
& event)
override
;
40
};
41
}
42
43
namespace
ccf
44
{
45
// SNIPPET_START: app_interface
53
std::unique_ptr<ccf::endpoints::EndpointRegistry>
make_user_endpoints
(
54
ccf::AbstractNodeContext
& context);
55
// SNIPPET_END: app_interface
56
}
ccf_deprecated.h
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:34
ccf::UserEndpointRegistry
Definition
app_interface.h:26
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:19
ccf
Definition
app_interface.h:14
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:55
ccf::endpoints::RequestCompletedEvent
Definition
endpoint_registry.h:42
Generated by
1.9.8