MySQL 9.3.0
Source Code Documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
url_host_endpoint.h
Go to the documentation of this file.
1/*
2 Copyright (c) 2024, 2025, Oracle and/or its affiliates.
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License, version 2.0,
6 as published by the Free Software Foundation.
7
8 This program is designed to work with certain software (including
9 but not limited to OpenSSL) that is licensed under separate terms,
10 as designated in a particular file or component or in included license
11 documentation. The authors of MySQL hereby grant you an additional
12 permission to link the program and your derivative works with the
13 separately licensed software that they have either included with
14 the program or referenced in the documentation.
15
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
20
21 You should have received a copy of the GNU General Public License
22 along with this program; if not, write to the Free Software
23 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24*/
25
26#ifndef ROUTER_SRC_MYSQL_REST_SERVICE_SRC_MRS_ENDPOINT_URL_HOST_ENDPOINT_H_
27#define ROUTER_SRC_MYSQL_REST_SERVICE_SRC_MRS_ENDPOINT_URL_HOST_ENDPOINT_H_
28
29#include <cstddef>
30#include <memory>
31
35
36namespace mrs {
37namespace endpoint {
38
40 public:
43 using UrlHostPtr = std::shared_ptr<UrlHost>;
44 using HandlerFactoryPtr = std::shared_ptr<mrs::interface::HandlerFactory>;
46
47 public:
49 HandlerFactoryPtr factory);
50
51 UniversalId get_id() const override;
52 UniversalId get_parent_id() const override;
53 EnabledType get_enabled_level() const override;
54
55 const UrlHostPtr get() const;
56 void set(const UrlHost &entry, EndpointBasePtr parent);
57 std::optional<std::string> get_options() const override;
58 Uri get_url() const override;
59
60 private:
61 void update() override;
63 std::string get_my_url_path_part() const override;
64 std::string get_my_url_part() const override;
65 bool does_this_node_require_authentication() const override;
66
68};
69
70} // namespace endpoint
71} // namespace mrs
72
73#endif // ROUTER_SRC_MYSQL_REST_SERVICE_SRC_MRS_ENDPOINT_URL_HOST_ENDPOINT_H_
Definition: uri.h:40
Definition: option_endpoint.h:39
OptionEndpoint(UniversalId service_id, EndpointConfigurationPtr configuration, HandlerFactoryPtr factory)
Definition: option_endpoint.cc:37
std::shared_ptr< mrs::interface::HandlerFactory > HandlerFactoryPtr
Definition: option_endpoint.h:41
Definition: url_host_endpoint.h:39
Uri get_url() const override
Definition: url_host_endpoint.cc:74
bool does_this_node_require_authentication() const override
Definition: url_host_endpoint.cc:105
void set(const UrlHost &entry, EndpointBasePtr parent)
Definition: url_host_endpoint.cc:69
std::string get_my_url_path_part() const override
Definition: url_host_endpoint.cc:97
mrs::rest::entry::AppUrlHost UrlHost
Definition: url_host_endpoint.h:42
UrlHost DataType
Definition: url_host_endpoint.h:45
const UrlHostPtr get() const
Definition: url_host_endpoint.cc:67
UrlHostEndpoint(const UrlHost &entry, EndpointConfigurationPtr configuration, HandlerFactoryPtr factory)
Definition: url_host_endpoint.cc:47
UniversalId get_parent_id() const override
Definition: url_host_endpoint.cc:65
UrlHostPtr entry_
Definition: url_host_endpoint.h:67
EnabledType get_this_node_enabled_level() const override
Definition: url_host_endpoint.cc:93
void update() override
Definition: url_host_endpoint.cc:53
std::shared_ptr< UrlHost > UrlHostPtr
Definition: url_host_endpoint.h:43
UniversalId get_id() const override
Definition: url_host_endpoint.cc:63
std::string get_my_url_part() const override
Definition: url_host_endpoint.cc:99
EnabledType get_enabled_level() const override
Definition: url_host_endpoint.cc:101
std::optional< std::string > get_options() const override
Definition: url_host_endpoint.cc:109
mrs::database::entry::EnabledType EnabledType
Definition: endpoint_base.h:59
std::shared_ptr< EndpointBase > EndpointBasePtr
Definition: endpoint_base.h:60
mrs::database::entry::UniversalId UniversalId
Definition: endpoint_base.h:61
std::shared_ptr< EndpointConfiguration > EndpointConfigurationPtr
Definition: endpoint_base.h:64
Definition: app_url_host.h:38
Definition: authorize_manager.h:48
required string configuration
Definition: replication_asynchronous_connection_failover.proto:49
Definition: completion_hash.h:35