From 835c1b283579ece4afc8276db663709f827c2db8 Mon Sep 17 00:00:00 2001 From: Gabor Retvari Date: Tue, 10 Dec 2024 13:11:57 +0100 Subject: [PATCH] refactor: Export the license config manager from the admin object --- internal/object/admin.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/object/admin.go b/internal/object/admin.go index 7a77814..4e56574 100644 --- a/internal/object/admin.go +++ b/internal/object/admin.go @@ -26,7 +26,7 @@ type Admin struct { MetricsEndpoint, HealthCheckEndpoint string metricsServer, healthCheckServer *http.Server health *http.ServeMux - licenseManager licensecfg.ConfigManager + LicenseManager licensecfg.ConfigManager licenseConfig *stnrv1.LicenseConfig log logging.LeveledLogger } @@ -41,7 +41,7 @@ func NewAdmin(conf stnrv1.Config, dryRun bool, rc ReadinessHandler, status Statu admin := Admin{ DryRun: dryRun, health: http.NewServeMux(), - licenseManager: licensecfg.New(logger.NewLogger("license")), + LicenseManager: licensecfg.New(logger.NewLogger("license")), log: logger.NewLogger("admin"), } admin.log.Tracef("NewAdmin: %s", req.String()) @@ -124,7 +124,7 @@ func (a *Admin) Reconcile(conf stnrv1.Config) error { return err } - a.licenseManager.Reconcile(req.LicenseConfig) + a.LicenseManager.Reconcile(req.LicenseConfig) a.licenseConfig = req.LicenseConfig return nil @@ -187,7 +187,7 @@ func (a *Admin) Status() stnrv1.Status { LogLevel: a.LogLevel, MetricsEndpoint: a.MetricsEndpoint, HealthCheckEndpoint: a.HealthCheckEndpoint, - LicensingInfo: a.licenseManager.Status(), + LicensingInfo: a.LicenseManager.Status(), } return &s }