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:
2020-06-01 12:41:48 +02:00
parent 43e9d00dcb
commit 10069568f9
9 changed files with 39 additions and 41 deletions

View File

@ -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
}