MySQL 8.0.32
Source Code Documentation
gr_message_service_example.h
Go to the documentation of this file.
1/* Copyright (c) 2019, 2022, Oracle and/or its affiliates.
2
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License, version 2.0,
5 as published by the Free Software Foundation.
6
7 This program is also distributed with certain software (including
8 but not limited to OpenSSL) that is licensed under separate terms,
9 as designated in a particular file or component or in included license
10 documentation. The authors of MySQL hereby grant you an additional
11 permission to link the program and your derivative works with the
12 separately licensed software that they have included with MySQL.
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License, version 2.0, for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
22
23#ifndef GR_MESSAGE_SERVICE_EXAMPLE_H
24#define GR_MESSAGE_SERVICE_EXAMPLE_H
25
27
28/**
29 @class GR_message_service_send_example
30
31 An example implementation of a module that uses GR send service.
32 */
33
35 public:
36 /**
37 UDF that will be called to send data to Group Replication send service.
38
39 @return false success, true on failure.
40 */
41 static char *udf(UDF_INIT *, UDF_ARGS *args, char *result,
42 unsigned long *length, unsigned char *, unsigned char *);
43
44 /**
45 UDF initialization procedure.
46
47 @return false success, true on failure.
48 */
49 static bool udf_init(UDF_INIT *init_id, UDF_ARGS *args, char *message);
50
51 /**
52 Register send method to send service message from GR.
53
54 @return false success, true on failure.
55 */
56 bool register_example();
57
58 /**
59 Unregister send method, will not allow send service message from GR.
60
61 @return false success, true on failure.
62 */
63 bool unregister_example();
64};
65
66/**
67 This function register examples that uses services recv and send of Group
68 replication.
69
70 @return false success, true on failure.
71 */
72
74
75/**
76 This function unregister examples that uses services recv and send of Group
77 replication.
78
79 @return false success, true on failure.
80 */
81
83
84#endif /* GR_MESSAGE_SERVICE_EXAMPLE_H */
An example implementation of a module that uses GR send service.
Definition: gr_message_service_example.h:34
bool unregister_example()
Unregister send method, will not allow send service message from GR.
Definition: gr_message_service_example.cc:248
bool register_example()
Register send method to send service message from GR.
Definition: gr_message_service_example.cc:190
static bool udf_init(UDF_INIT *init_id, UDF_ARGS *args, char *message)
UDF initialization procedure.
Definition: gr_message_service_example.cc:173
static char * udf(UDF_INIT *, UDF_ARGS *args, char *result, unsigned long *length, unsigned char *, unsigned char *)
UDF that will be called to send data to Group Replication send service.
Definition: gr_message_service_example.cc:124
bool gr_service_message_example_deinit()
This function unregister examples that uses services recv and send of Group replication.
Definition: gr_message_service_example.cc:311
bool gr_service_message_example_init()
This function register examples that uses services recv and send of Group replication.
Definition: gr_message_service_example.cc:289
bool length(const dd::Spatial_reference_system *srs, const Geometry *g1, double *length, bool *null) noexcept
Computes the length of linestrings and multilinestrings.
Definition: length.cc:75
Definition: udf_registration_types.h:47
Information about the result of a user defined function.
Definition: udf_registration_types.h:65
Definition: result.h:29