Skip to content

Commit

Permalink
refactor: Export the license config manager from the admin object
Browse files Browse the repository at this point in the history
  • Loading branch information
rg0now committed Dec 10, 2024
1 parent 8afc1fd commit 835c1b2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions internal/object/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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())
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit 835c1b2

Please sign in to comment.