OceanBase Plugin Development Kit
OceanBase Plugin Development Kit
载入中...
搜索中...
未找到
ob_plugin.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 ObPluginobp_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_MAX
 max plugin type
 

宏定义说明

◆ OBP_AUTHOR_OCEANBASE

#define OBP_AUTHOR_OCEANBASE   "OceanBase Corporation"

在文件 ob_plugin.h26 行定义.

◆ OBP_DECLARE_PLUGIN

#define OBP_DECLARE_PLUGIN ( name)
值:
#define OBP_DECLARE_PLUGIN_(name)
in static plugin that built with observer

this is used to define a plugin

  • C/C++ code for example,
OBP_DECLARE_PLUGIN(example_plugin)
{
"OceanBase Corporation", // author
OBP_MAKE_VERSION(1, 0, 0), // version
plugin_init, // init routine
plugin_deinit, // deinit routine(optional)
int plugin_init(ObPluginParamPtr plugin)
plugin init function
#define OBP_MAKE_VERSION(major, minor, patch)
#define OBP_LICENSE_MULAN_PSL_V2
#define OBP_DECLARE_PLUGIN_END
A help macro OBP_DECLARE_PLUGIN
#define OBP_DECLARE_PLUGIN(name)
this is used to define a plugin

在文件 ob_plugin.h74 行定义.

◆ OBP_DECLARE_PLUGIN_

#define OBP_DECLARE_PLUGIN_ ( name)
值:
#define OBP_PLUGIN_EXPORT
#define OBP_BUILTIN_PLUGIN_VAR(name)
ob plugin description structure

in static plugin that built with observer

在文件 ob_plugin.h54 行定义.

◆ OBP_DECLARE_PLUGIN_END

#define OBP_DECLARE_PLUGIN_END

A help macro OBP_DECLARE_PLUGIN

在文件 ob_plugin.h81 行定义.

◆ OBP_LICENSE_APACHE_V2

#define OBP_LICENSE_APACHE_V2   "Apache 2.0"

在文件 ob_plugin.h110 行定义.

◆ OBP_LICENSE_BSD

#define OBP_LICENSE_BSD   "BSD"

在文件 ob_plugin.h108 行定义.

◆ OBP_LICENSE_GPL

#define OBP_LICENSE_GPL   "GPL"

define plugin licenses

You can use other strings

在文件 ob_plugin.h107 行定义.

◆ OBP_LICENSE_MIT

#define OBP_LICENSE_MIT   "MIT"

在文件 ob_plugin.h109 行定义.

◆ OBP_LICENSE_MULAN_PSL_V2

#define OBP_LICENSE_MULAN_PSL_V2   "Mulan PSL v2"

在文件 ob_plugin.h112 行定义.

◆ OBP_LICENSE_MULAN_PUBL_V2

#define OBP_LICENSE_MULAN_PUBL_V2   "Mulan PubL v2"

在文件 ob_plugin.h111 行定义.

◆ OBP_MAKE_VERSION

#define OBP_MAKE_VERSION ( major,
minor,
patch )
值:
#define OBP_VERSION_FIELD_NUMBER
The maximum number of each field of version

在文件 ob_plugin.h126 行定义.

◆ OBP_PLUGIN_API_VERSION

#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.h32 行定义.

◆ OBP_PLUGIN_API_VERSION_CURRENT

#define OBP_PLUGIN_API_VERSION_CURRENT   OBP_PLUGIN_API_VERSION

current API version

This value will change if we add more API

在文件 ob_plugin.h37 行定义.

类型定义说明

◆ ObPlugin

typedef struct _ObPlugin ObPlugin

在文件 ob_plugin.h153 行定义.

◆ ObPluginParamPtr

@NOTE all API should be declared as C interface

The plugin init/deinit param type

在文件 ob_plugin.h91 行定义.

◆ ObPluginVersion

typedef uint64_t ObPluginVersion

The version type

A version contains 3 fields:

  • major indicates significant changes that may include backward-incompatible updates.
  • minor represents backward-compatible feature additions and improvements.
  • patch backward-compatible bug fixes and minor corrections.

Use OBP_MAKE_VERSION to create a version data. create a version number

在文件 ob_plugin.h123 行定义.

函数说明

◆ obp_param_plugin()

OBP_PUBLIC_API ObPlugin * obp_param_plugin ( ObPluginParamPtr param)

get the struct ObPlugin from the parameter

◆ obp_param_plugin_user_data()

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_param_set_plugin_user_data()

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_FT_PARSER

OBP_PLUGIN_TYPE_FT_PARSER

fulltext parser plugin

在文件 ob_plugin.h99 行定义.

◆ OBP_PLUGIN_TYPE_INVALID

OBP_PLUGIN_TYPE_INVALID = 0

在文件 ob_plugin.h98 行定义.

◆ OBP_PLUGIN_TYPE_MAX

OBP_PLUGIN_TYPE_MAX

max plugin type

在文件 ob_plugin.h100 行定义.

◆ ObPluginType

enum OBP_PUBLIC_API ObPluginType

Plugin types

在文件 ob_plugin.h96 行定义.