Revert backwards incompatible reva config changes
The commit of unifying the Reva Client config introduced some backwards incompatible changes to the config structures and yaml config tags. For the "thumbnails", "webdav" and "notifications" service. This reverts the changes on the service and introduces TLS options in a backwards compatible manner.
This commit is contained in:
committed by
Ralf Haferkamp
parent
8cead4557f
commit
fbb3382a42
@@ -27,7 +27,15 @@ type Channel interface {
|
||||
|
||||
// NewMailChannel instantiates a new mail communication channel.
|
||||
func NewMailChannel(cfg config.Config, logger log.Logger) (Channel, error) {
|
||||
gc, err := pool.GetGatewayServiceClient(cfg.Notifications.Reva.Address, cfg.Notifications.Reva.GetRevaOptions()...)
|
||||
tm, err := pool.StringToTLSMode(cfg.Notifications.RevaGatewayTLSMode)
|
||||
if err != nil {
|
||||
logger.Error().Err(err).Msg("could not get gateway client tls mode")
|
||||
return nil, err
|
||||
}
|
||||
gc, err := pool.GetGatewayServiceClient(cfg.Notifications.RevaGateway,
|
||||
pool.WithTLSCACert(cfg.Notifications.RevaGatewayTLSCACert),
|
||||
pool.WithTLSMode(tm),
|
||||
)
|
||||
if err != nil {
|
||||
logger.Error().Err(err).Msg("could not get gateway client")
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user