fix: renamed storage endpoint into dsn
Changes: - Renamed storage endpoint into dsn (data source name). - Add additional dsn fallback property. This dsn will be used in futes to store informations, if the main dsn backend does not work correctly. For example, if no connection can be established over the network to a database.
This commit is contained in:
@ -18,13 +18,13 @@ func Start(cnf *config.Config, flogger logger.Logger) error {
|
||||
|
||||
measuredValueChannel := make(chan *types.MeasuredValue, 0)
|
||||
|
||||
// load storage endpoint
|
||||
storageEndpointURL, err := url.Parse(cnf.StorageEndpoint)
|
||||
// load data source name (dsn)
|
||||
dsnURL, err := url.Parse(cnf.DSN)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
repo, err := repository.New(storageEndpointURL, flogger)
|
||||
repo, err := repository.New(dsnURL, flogger)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user