![]() |
OceanBase Plugin Development Kit
OceanBase Plugin Development Kit
|
#include "oceanbase/ob_plugin_base.h"#include "oceanbase/ob_plugin_errno.h"#include "oceanbase/ob_plugin_log.h"#include "oceanbase/ob_plugin_allocator.h"类 | |
| struct | _ObPlugin |
| ob plugin description structure 更多... | |
宏定义 | |
| #define | OBP_AUTHOR_OCEANBASE "OceanBase Corporation" |
| #define | OBP_PLUGIN_API_VERSION OBP_MAKE_VERSION(0, 1, 0) |
| plugin API version and this is the minimum version | |
| #define | OBP_PLUGIN_API_VERSION_CURRENT OBP_PLUGIN_API_VERSION |
| current API version | |
| #define | OBP_DECLARE_PLUGIN_(name) |
| in static plugin that built with observer | |
| #define | OBP_DECLARE_PLUGIN(name) |
| this is used to define a plugin | |
| #define | OBP_DECLARE_PLUGIN_END |
| A help macro OBP_DECLARE_PLUGIN | |
| #define | OBP_LICENSE_GPL "GPL" |
| define plugin licenses | |
| #define | OBP_LICENSE_BSD "BSD" |
| #define | OBP_LICENSE_MIT "MIT" |
| #define | OBP_LICENSE_APACHE_V2 "Apache 2.0" |
| #define | OBP_LICENSE_MULAN_PUBL_V2 "Mulan PubL v2" |
| #define | OBP_LICENSE_MULAN_PSL_V2 "Mulan PSL v2" |
| #define | OBP_MAKE_VERSION(major, minor, patch) |
类型定义 | |
| typedef ObPluginDatum | ObPluginParamPtr |
| @NOTE all API should be declared as C interface | |
| typedef uint64_t | ObPluginVersion |
| The version type | |
| typedef struct _ObPlugin | ObPlugin |
函数 | |
| OBP_PUBLIC_API ObPlugin * | obp_param_plugin (ObPluginParamPtr param) |
get the struct ObPlugin from the parameter | |
| OBP_PUBLIC_API ObPluginDatum | obp_param_plugin_user_data (ObPluginParamPtr param) |
| get the plugin instance specific(user data) from the parameter | |
| OBP_PUBLIC_API void | obp_param_set_plugin_user_data (ObPluginParamPtr param, ObPluginDatum plugin_spec) |
| set the plugin instance specific(user data) in the parameter | |
变量 | |
| enum OBP_PUBLIC_API | ObPluginType |
| Plugin types | |
| OBP_PLUGIN_TYPE_INVALID = 0 | |
| OBP_PLUGIN_TYPE_FT_PARSER | |
| fulltext parser plugin | |
| OBP_PLUGIN_TYPE_EXTERNAL | |
| OBP_PLUGIN_TYPE_MAX | |
| external table data resource | |
| #define OBP_AUTHOR_OCEANBASE "OceanBase Corporation" |
在文件 ob_plugin.h 第 26 行定义.
| #define OBP_DECLARE_PLUGIN | ( | name | ) |
this is used to define a plugin
在文件 ob_plugin.h 第 74 行定义.
| #define OBP_DECLARE_PLUGIN_ | ( | name | ) |
| #define OBP_DECLARE_PLUGIN_END |
A help macro OBP_DECLARE_PLUGIN
在文件 ob_plugin.h 第 81 行定义.
| #define OBP_LICENSE_APACHE_V2 "Apache 2.0" |
在文件 ob_plugin.h 第 111 行定义.
| #define OBP_LICENSE_BSD "BSD" |
在文件 ob_plugin.h 第 109 行定义.
| #define OBP_LICENSE_GPL "GPL" |
| #define OBP_LICENSE_MIT "MIT" |
在文件 ob_plugin.h 第 110 行定义.
| #define OBP_LICENSE_MULAN_PSL_V2 "Mulan PSL v2" |
在文件 ob_plugin.h 第 113 行定义.
| #define OBP_LICENSE_MULAN_PUBL_V2 "Mulan PubL v2" |
在文件 ob_plugin.h 第 112 行定义.
| #define OBP_MAKE_VERSION | ( | major, | |
| minor, | |||
| patch ) |
在文件 ob_plugin.h 第 127 行定义.
| #define OBP_PLUGIN_API_VERSION OBP_MAKE_VERSION(0, 1, 0) |
plugin API version and this is the minimum version
This is a constant value
在文件 ob_plugin.h 第 32 行定义.
| #define OBP_PLUGIN_API_VERSION_CURRENT OBP_PLUGIN_API_VERSION |
在文件 ob_plugin.h 第 154 行定义.
| typedef ObPluginDatum ObPluginParamPtr |
@NOTE all API should be declared as C interface
The plugin init/deinit param type
在文件 ob_plugin.h 第 91 行定义.
| typedef uint64_t ObPluginVersion |
The version type
A version contains 3 fields:
Use OBP_MAKE_VERSION to create a version data. create a version number
在文件 ob_plugin.h 第 124 行定义.
| OBP_PUBLIC_API ObPlugin * obp_param_plugin | ( | ObPluginParamPtr | param | ) |
get the struct ObPlugin from the parameter
| OBP_PUBLIC_API ObPluginDatum obp_param_plugin_user_data | ( | ObPluginParamPtr | param | ) |
get the plugin instance specific(user data) from the parameter
the plugin instance specific data is a pointer and you can set it to any data if you want to.
| OBP_PUBLIC_API void obp_param_set_plugin_user_data | ( | ObPluginParamPtr | param, |
| ObPluginDatum | plugin_spec ) |
set the plugin instance specific(user data) in the parameter
| OBP_PLUGIN_TYPE_EXTERNAL |
在文件 ob_plugin.h 第 100 行定义.
| OBP_PLUGIN_TYPE_FT_PARSER |
fulltext parser plugin
在文件 ob_plugin.h 第 99 行定义.
| OBP_PLUGIN_TYPE_INVALID = 0 |
在文件 ob_plugin.h 第 98 行定义.
| OBP_PLUGIN_TYPE_MAX |
| enum OBP_PUBLIC_API ObPluginType |
Plugin types
在文件 ob_plugin.h 第 96 行定义.