fix: need to update config management in renter pkg
This commit is contained in:
parent
41a3b1faa6
commit
939e329591
|
@ -10,9 +10,10 @@ import (
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"git.lumeweb.com/LumeWeb/portal/config"
|
||||||
|
|
||||||
"git.lumeweb.com/LumeWeb/portal/cron"
|
"git.lumeweb.com/LumeWeb/portal/cron"
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"github.com/spf13/viper"
|
|
||||||
rhpv2 "go.sia.tech/core/rhp/v2"
|
rhpv2 "go.sia.tech/core/rhp/v2"
|
||||||
"go.sia.tech/renterd/api"
|
"go.sia.tech/renterd/api"
|
||||||
busClient "go.sia.tech/renterd/bus/client"
|
busClient "go.sia.tech/renterd/bus/client"
|
||||||
|
@ -27,7 +28,7 @@ type UploadIDHandler func(uploadID string)
|
||||||
|
|
||||||
type RenterServiceParams struct {
|
type RenterServiceParams struct {
|
||||||
fx.In
|
fx.In
|
||||||
Config *viper.Viper
|
Config *config.Manager
|
||||||
Logger *zap.Logger
|
Logger *zap.Logger
|
||||||
Cron *cron.CronServiceDefault
|
Cron *cron.CronServiceDefault
|
||||||
}
|
}
|
||||||
|
@ -35,7 +36,7 @@ type RenterServiceParams struct {
|
||||||
type RenterDefault struct {
|
type RenterDefault struct {
|
||||||
busClient *busClient.Client
|
busClient *busClient.Client
|
||||||
workerClient *workerClient.Client
|
workerClient *workerClient.Client
|
||||||
config *viper.Viper
|
config *config.Manager
|
||||||
logger *zap.Logger
|
logger *zap.Logger
|
||||||
cron *cron.CronServiceDefault
|
cron *cron.CronServiceDefault
|
||||||
}
|
}
|
||||||
|
@ -101,8 +102,8 @@ func (r *RenterDefault) UploadObject(ctx context.Context, file io.Reader, bucket
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *RenterDefault) init() error {
|
func (r *RenterDefault) init() error {
|
||||||
addr := r.config.GetString("core.sia.url")
|
addr := r.config.Config().Core.Sia.URL
|
||||||
passwd := r.config.GetString("core.sia.key")
|
passwd := r.config.Config().Core.Sia.Key
|
||||||
|
|
||||||
addrURL, err := url.Parse(addr)
|
addrURL, err := url.Parse(addr)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue