From 11036c77c8b69b830bfa99afad2422916a49c6e6 Mon Sep 17 00:00:00 2001 From: zhanghan2021 Date: Wed, 14 Jun 2023 17:40:45 +0800 Subject: [PATCH] add prometheus plugin frame type --- prometheus/server/config.yml.templete | 1 + prometheus/server/config/config.go | 1 + prometheus/server/plugin/plugin_manager.go | 1 + sdk/plugin/client/plugin.go | 1 + 4 files changed, 4 insertions(+) diff --git a/prometheus/server/config.yml.templete b/prometheus/server/config.yml.templete index abcf3ef6..cefac625 100644 --- a/prometheus/server/config.yml.templete +++ b/prometheus/server/config.yml.templete @@ -1,5 +1,6 @@ prometheus: url: "http://localhost:8090/plugin/Prometheus" + plugin_type: "micro-app" reverseDest: "http://localhost:9090" http: addr: "0.0.0.0:8090" diff --git a/prometheus/server/config/config.go b/prometheus/server/config/config.go index 55f96334..97fac6e5 100644 --- a/prometheus/server/config/config.go +++ b/prometheus/server/config/config.go @@ -11,6 +11,7 @@ import ( type Prometheus struct { URL string `yaml:"url"` + PluginType string `yaml:"plugin_type"` ReverseDest string `yaml:"reverseDest"` } type HttpConf struct { diff --git a/prometheus/server/plugin/plugin_manager.go b/prometheus/server/plugin/plugin_manager.go index c28d90dd..abb84208 100644 --- a/prometheus/server/plugin/plugin_manager.go +++ b/prometheus/server/plugin/plugin_manager.go @@ -13,6 +13,7 @@ func Init(conf *config.Prometheus) *client.PluginInfo { Author: "zhanghan", Email: "zhanghan@kylinos.cn", Url: conf.URL, + PluginType: conf.PluginType, ReverseDest: conf.ReverseDest, } diff --git a/sdk/plugin/client/plugin.go b/sdk/plugin/client/plugin.go index e3471926..097e86c1 100644 --- a/sdk/plugin/client/plugin.go +++ b/sdk/plugin/client/plugin.go @@ -13,6 +13,7 @@ type PluginInfo struct { Author string `json:"author"` Email string `json:"email"` Url string `json:"url"` + PluginType string `json:"plugin_type"` ReverseDest string `json:"reverse_dest"` } -- Gitee