diff --git a/docs/server_plugin.md b/docs/server_plugin.md index b282a9b4..7fbd5077 100644 --- a/docs/server_plugin.md +++ b/docs/server_plugin.md @@ -210,7 +210,7 @@ Testing and deployment of the plugin are crucial steps to ensure the completenes The compilation process ensures that the plugin's code is consistent with the main project, while the task dependencies in the Makefile ensure that the plugin's build process is closely integrated with the main system's compilation, achieving an integrated build and release process. The specific steps are as follows: -**Define Plugin Directory**: At the top of the Makefile, we can see a line of code defining the plugin directory, as shown in the image below: +***Define Plugin Directory***: At the top of the Makefile, we can see a line of code defining the plugin directory, as shown in the image below: ![Define Plugin Directory](/images/plugin_image11.png) @@ -222,9 +222,9 @@ This line of code specifies the storage location of the plugin, which is the ser ***Figure 11 Plugin File Path Configuration*** -**Generate Version Information and Start Build**: The generate-version-and-build task includes a series of steps to generate version numbers, commit IDs, build times, and other information. This information is helpful for tracking the version and build status of the plugin. +***Generate Version Information and Start Build***: The generate-version-and-build task includes a series of steps to generate version numbers, commit IDs, build times, and other information. This information is helpful for tracking the version and build status of the plugin. -**Plugin Compilation Logic**: In the Makefile, the plugins: task is responsible for executing the plugin compilation, as shown in the image below: +***Plugin Compilation Logic***: In the Makefile, the plugins: task is responsible for executing the plugin compilation, as shown in the image below: ![Plugin Compilation Task plugins](/images/plugin_image13.png) @@ -234,7 +234,7 @@ Plugin Directory Check: test -d $(NHP_PLUGINS) checks if the defined plugin dire Execute Compilation: If the plugin directory exists, $(MAKE) -C $(NHP_PLUGINS) enters that directory and executes the Makefile within it, performing the compilation operation for the plugin. -**Overall Compilation Process**: During the overall project build process (Linux and macOS: run the script make in the root directory; Windows: run the BAT file build.bat in the root directory), the plugins task in the Makefile will be called. If the plugin directory exists and is valid, the plugin's Makefile will be executed to complete the plugin's build. During compilation, plugin binary files or other forms of output files may be generated for use by the NHP server. +***Overall Compilation Process***: During the overall project build process (Linux and macOS: run the script make in the root directory; Windows: run the BAT file build.bat in the root directory), the plugins task in the Makefile will be called. If the plugin directory exists and is valid, the plugin's Makefile will be executed to complete the plugin's build. During compilation, plugin binary files or other forms of output files may be generated for use by the NHP server. **2. Local Environment Function Testing** @@ -258,13 +258,13 @@ After local environment testing passes, developers need to confirm and optimize Once local testing and optimization are complete, the plugin can proceed to the deployment phase in actual application scenarios. To deploy your plugin, simply build and run the main application. Your plugin will be included in the build and will be available when the server runs. During plugin deployment, it is usually necessary to configure according to the specific needs of the application scenario. The specific steps are as follows: -**Deployment Environment Preparation**: Ensure that the server configuration in the production environment is consistent or close to that of the local testing environment, including the operating system, network configuration, dependency libraries, etc. +***Deployment Environment Preparation***: Ensure that the server configuration in the production environment is consistent or close to that of the local testing environment, including the operating system, network configuration, dependency libraries, etc. -**Plugin Installation and Configuration**: Deploy the tested plugin code to the production server, configuring it according to the requirements of the actual application scenario, including plugin paths, interface addresses, access control server addresses, authentication mechanisms, etc. +***Plugin Installation and Configuration***: Deploy the tested plugin code to the production server, configuring it according to the requirements of the actual application scenario, including plugin paths, interface addresses, access control server addresses, authentication mechanisms, etc. -**Logging and Monitoring Setup**: After deployment, improve log level configuration to facilitate timely detection and resolution of issues during actual application. +***Logging and Monitoring Setup***: After deployment, improve log level configuration to facilitate timely detection and resolution of issues during actual application. -**Start NHP Service to Check Plugin Loading Status**: Start the NHP service according to the NHP service startup process, check the plugin loading status based on the log files in the log directory, and verify whether the plugin functions normally according to the local plugin testing process. +***Start NHP Service to Check Plugin Loading Status***: Start the NHP service according to the NHP service startup process, check the plugin loading status based on the log files in the log directory, and verify whether the plugin functions normally according to the local plugin testing process. **5. Production Environment Validation and Maintenance** diff --git a/docs/zh-cn/server_plugin.zh-cn.md b/docs/zh-cn/server_plugin.zh-cn.md index 0ef9fb9f..f047bc6d 100644 --- a/docs/zh-cn/server_plugin.zh-cn.md +++ b/docs/zh-cn/server_plugin.zh-cn.md @@ -212,7 +212,7 @@ NHP 服务器中的每个插件通常都结构化为一个单独的 Go 包。例 编译过程确保插件的代码与主项目保持一致,同时通过 Makefile 中的任务依赖关系,保证了插件的构建流程和主系统的编译紧密结合,实现一体化的构建与发布流程。具体步骤如下: -**定义插件目录**: 在 Makefile 的顶部,我们可以看到一行定义插件目录的代码,如下图所示: +***定义插件目录***: 在 Makefile 的顶部,我们可以看到一行定义插件目录的代码,如下图所示: ![定义插件目录](/images/plugin_image11.png) @@ -224,9 +224,9 @@ NHP 服务器中的每个插件通常都结构化为一个单独的 Go 包。例 ***图十一 插件文件路径配置*** -**生成版本信息并开始构建**: 在 generate-version-and-build 任务中,包含了一系列步骤用于生成版本号、提交 ID、构建时间等信息。这些信息有助于跟踪插件的版本和构建状态。 +***生成版本信息并开始构建***: 在 generate-version-and-build 任务中,包含了一系列步骤用于生成版本号、提交 ID、构建时间等信息。这些信息有助于跟踪插件的版本和构建状态。 -**插件的编译逻辑**: 在 Makefile 中的 plugins: 任务负责执行插件的编译,如下图: +***插件的编译逻辑***: 在 Makefile 中的 plugins: 任务负责执行插件的编译,如下图: ![插件编译任务plugins](/images/plugin_image13.png) @@ -236,7 +236,7 @@ NHP 服务器中的每个插件通常都结构化为一个单独的 Go 包。例 执行编译: 如果插件目录存在,$(MAKE) -C $(NHP_PLUGINS) 会进入该目录并执行其中的 Makefile,即在插件目录内执行插件的编译操作。 -**整体编译过程**:在整体项目构建过程中(Linux与macOS:运行代码根目录下脚本 make; Windows:运行代码根目录下BAT文件 build.bat),Makefile 中的 plugins 任务会被调用。如果插件目录存在且有效,插件的 Makefile 会被执行以完成插件的构建。在编译的过程中,可能会生成插件的二进制文件或其他形式的输出文件,以供 NHP 服务器使用。 +***整体编译过程***:在整体项目构建过程中(Linux与macOS:运行代码根目录下脚本 make; Windows:运行代码根目录下BAT文件 build.bat),Makefile 中的 plugins 任务会被调用。如果插件目录存在且有效,插件的 Makefile 会被执行以完成插件的构建。在编译的过程中,可能会生成插件的二进制文件或其他形式的输出文件,以供 NHP 服务器使用。 **2.本地环境功能测试** @@ -260,13 +260,13 @@ NHP 服务器中的每个插件通常都结构化为一个单独的 Go 包。例 本地测试和优化完成后,插件即可进入实际应用场景的部署阶段。要部署您的插件,只需构建并运行主应用程序。您的插件将包含在构建中,并在服务器运行时可用。在部署插件时,通常需要根据应用场景的具体需求进行配置。具体步骤如下: -**部署环境准备**:确保生产环境的服务器配置与本地测试环境一致或接近,包括操作系统、网络配置、依赖库等。 +***部署环境准备***:确保生产环境的服务器配置与本地测试环境一致或接近,包括操作系统、网络配置、依赖库等。 -**插件安装与配置**:将经过测试的插件代码部署到生产服务器上,按照实际应用场景的要求进行相应的配置,包括配置插件路径、接口地址、门禁服务器地址、身份认证机制等。 +***插件安装与配置***:将经过测试的插件代码部署到生产服务器上,按照实际应用场景的要求进行相应的配置,包括配置插件路径、接口地址、门禁服务器地址、身份认证机制等。 -**日志与监控设置**:在部署完成后,完善日志等级配置,便于在实际应用中及时发现和解决问题。 +***日志与监控设置***:在部署完成后,完善日志等级配置,便于在实际应用中及时发现和解决问题。 -**启动NHP服务查看插件加载情况**:按照NHP服务启动流程启动NHP服务,根据log目录下的日志文件查看插件的加载情况,并且按照本地插件测试流程验证插件功能是否正常。 +***启动NHP服务查看插件加载情况***:按照NHP服务启动流程启动NHP服务,根据log目录下的日志文件查看插件的加载情况,并且按照本地插件测试流程验证插件功能是否正常。 **5. 生产环境验证与运维**