From 6e7d415a6ac1f1535630494a901e77701bcd4a8d Mon Sep 17 00:00:00 2001 From: Wangjunqi123 Date: Mon, 24 Jun 2024 13:52:45 +0800 Subject: [PATCH] template/server: do not use server_addr in yaml as plugininfo.url --- template/server/pluginclient/meta.go | 2 +- template/server/pluginclient/pluginClient.go | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/template/server/pluginclient/meta.go b/template/server/pluginclient/meta.go index afd17594..cc0f9b9d 100644 --- a/template/server/pluginclient/meta.go +++ b/template/server/pluginclient/meta.go @@ -10,6 +10,6 @@ var PluginInfo = &client.PluginInfo{ Description: "template plugin for PilotGo", Author: "", Email: "", - Url: "", + Url: "", // 插件服务端地址,非插件配置文件中web服务器的监听地址 PluginType: "micro-app", } diff --git a/template/server/pluginclient/pluginClient.go b/template/server/pluginclient/pluginClient.go index 3d4cf587..d89c3c84 100644 --- a/template/server/pluginclient/pluginClient.go +++ b/template/server/pluginclient/pluginClient.go @@ -3,7 +3,6 @@ package pluginclient import ( "context" - "gitee.com/openeuler/PilotGo-plugin-template/conf" "gitee.com/openeuler/PilotGo/sdk/common" "gitee.com/openeuler/PilotGo/sdk/plugin/client" ) @@ -13,12 +12,6 @@ var Global_Client *client.Client var Global_Context context.Context func InitPluginClient() { - if conf.Global_Config.Template.Https_enabled { - PluginInfo.Url = "https://" + conf.Global_Config.Template.Addr - } else { - PluginInfo.Url = "http://" + conf.Global_Config.Template.Addr - } - Global_Client = client.DefaultClient(PluginInfo) // 注册插件扩展点 -- Gitee