From c00cda5a75babbc7f908c34402bbb8f46e799da4 Mon Sep 17 00:00:00 2001 From: eryajf Date: Sun, 1 Sep 2024 15:39:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=86=E5=85=AC=E7=94=A8=E5=B7=A5=E5=85=B7?= =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E5=88=B0public=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/cmd/root.go | 3 ++- pkg/export/cron_cache.go | 3 ++- pkg/export/export_gauge.go | 3 ++- pkg/provider/aliyun.go | 5 +++-- pkg/provider/tencent.go | 3 ++- {pkg => public}/logger/logger.go | 0 public/public.go | 3 ++- {pkg => public}/tools/time.go | 0 8 files changed, 13 insertions(+), 7 deletions(-) rename {pkg => public}/logger/logger.go (100%) rename {pkg => public}/tools/time.go (100%) diff --git a/pkg/cmd/root.go b/pkg/cmd/root.go index ee49eaa..da275ef 100644 --- a/pkg/cmd/root.go +++ b/pkg/cmd/root.go @@ -8,7 +8,8 @@ import ( "runtime" "github.com/eryajf/cloud_dns_exporter/pkg/export" - "github.com/eryajf/cloud_dns_exporter/pkg/logger" + "github.com/eryajf/cloud_dns_exporter/public/logger" + "github.com/eryajf/cloud_dns_exporter/public" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" diff --git a/pkg/export/cron_cache.go b/pkg/export/cron_cache.go index f198b91..2125a80 100644 --- a/pkg/export/cron_cache.go +++ b/pkg/export/cron_cache.go @@ -5,7 +5,8 @@ import ( "fmt" "sync" - "github.com/eryajf/cloud_dns_exporter/pkg/logger" + "github.com/eryajf/cloud_dns_exporter/public/logger" + "github.com/eryajf/cloud_dns_exporter/pkg/provider" "github.com/eryajf/cloud_dns_exporter/public" "github.com/robfig/cron/v3" diff --git a/pkg/export/export_gauge.go b/pkg/export/export_gauge.go index 6b3f816..0c29a82 100644 --- a/pkg/export/export_gauge.go +++ b/pkg/export/export_gauge.go @@ -5,7 +5,8 @@ import ( "fmt" "sync" - "github.com/eryajf/cloud_dns_exporter/pkg/logger" + "github.com/eryajf/cloud_dns_exporter/public/logger" + "github.com/eryajf/cloud_dns_exporter/pkg/provider" "github.com/eryajf/cloud_dns_exporter/public" "github.com/prometheus/client_golang/prometheus" diff --git a/pkg/provider/aliyun.go b/pkg/provider/aliyun.go index 752a742..71b75ec 100644 --- a/pkg/provider/aliyun.go +++ b/pkg/provider/aliyun.go @@ -10,8 +10,9 @@ import ( openapi "github.com/alibabacloud-go/darabonba-openapi/v2/client" "github.com/alibabacloud-go/tea/tea" - "github.com/eryajf/cloud_dns_exporter/pkg/logger" - "github.com/eryajf/cloud_dns_exporter/pkg/tools" + "github.com/eryajf/cloud_dns_exporter/public/logger" + "github.com/eryajf/cloud_dns_exporter/public/tools" + "github.com/eryajf/cloud_dns_exporter/public" ) diff --git a/pkg/provider/tencent.go b/pkg/provider/tencent.go index 0939ac2..dbdbaed 100644 --- a/pkg/provider/tencent.go +++ b/pkg/provider/tencent.go @@ -7,7 +7,8 @@ import ( "time" "github.com/alibabacloud-go/tea/tea" - "github.com/eryajf/cloud_dns_exporter/pkg/logger" + "github.com/eryajf/cloud_dns_exporter/public/logger" + "github.com/eryajf/cloud_dns_exporter/public" "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common" "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors" diff --git a/pkg/logger/logger.go b/public/logger/logger.go similarity index 100% rename from pkg/logger/logger.go rename to public/logger/logger.go diff --git a/public/public.go b/public/public.go index 0124699..ddc1fe0 100644 --- a/public/public.go +++ b/public/public.go @@ -7,7 +7,8 @@ import ( "time" "github.com/allegro/bigcache/v3" - "github.com/eryajf/cloud_dns_exporter/pkg/logger" + "github.com/eryajf/cloud_dns_exporter/public/logger" + "gopkg.in/yaml.v2" ) diff --git a/pkg/tools/time.go b/public/tools/time.go similarity index 100% rename from pkg/tools/time.go rename to public/tools/time.go