MySQL 9.0.0
Source Code Documentation
gr_message_service_example.h
Go to the documentation of this file.
1/* Copyright (c) 2019, 2024, 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 designed to work 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 either included with
13 the program or referenced in the documentation.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License, version 2.0, for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
23
24#ifndef GR_MESSAGE_SERVICE_EXAMPLE_H
25#define GR_MESSAGE_SERVICE_EXAMPLE_H
26
28
29/**
30 @class GR_message_service_send_example
31
32 An example implementation of a module that uses GR send service.
33 */
34
36 public:
37 /**
38 UDF that will be called to send data to Group Replication send service.
39
40 @return false success, true on failure.
41 */
42 static char *udf(UDF_INIT *, UDF_ARGS *args, char *result,
43 unsigned long *length, unsigned char *, unsigned char *);
44
45 /**
46 UDF initialization procedure.
47
48 @return false success, true on failure.
49 */
50 static bool udf_init(UDF_INIT *init_id, UDF_ARGS *args, char *message);
51
52 /**
53 Register send method to send service message from GR.
54
55 @return false success, true on failure.
56 */
57 bool register_example();
58
59 /**
60 Unregister send method, will not allow send service message from GR.
61
62 @return false success, true on failure.
63 */
64 bool unregister_example();
65};
66
67/**
68 This function register examples that uses services recv and send of Group
69 replication.
70
71 @return false success, true on failure.
72 */
73
75
76/**
77 This function unregister examples that uses services recv and send of Group
78 replication.
79
80 @return false success, true on failure.
81 */
82
84
85#endif /* GR_MESSAGE_SERVICE_EXAMPLE_H */
An example implementation of a module that uses GR send service.
Definition: gr_message_service_example.h:35
bool unregister_example()
Unregister send method, will not allow send service message from GR.
Definition: gr_message_service_example.cc:249
bool register_example()
Register send method to send service message from GR.
Definition: gr_message_service_example.cc:191
static bool udf_init(UDF_INIT *init_id, UDF_ARGS *args, char *message)
UDF initialization procedure.
Definition: gr_message_service_example.cc:174
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:125
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:312
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:290
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:76
Definition: udf_registration_types.h:48
Information about the result of a user defined function.
Definition: udf_registration_types.h:66
Definition: result.h:30