mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2025-12-30 01:28:08 -05:00
31 lines
553 B
Go
31 lines
553 B
Go
package shared
|
|
|
|
import (
|
|
"github.com/opencloud-eu/reva/v2/pkg/rgrpc/todo/pool"
|
|
)
|
|
|
|
var defaultRevaConfig = Reva{
|
|
Address: "eu.opencloud.api.gateway",
|
|
}
|
|
|
|
func DefaultRevaConfig() *Reva {
|
|
// copy
|
|
ret := defaultRevaConfig
|
|
return &ret
|
|
}
|
|
|
|
func (r *Reva) GetRevaOptions() []pool.Option {
|
|
tm, _ := pool.StringToTLSMode(r.TLS.Mode)
|
|
opts := []pool.Option{
|
|
pool.WithTLSMode(tm),
|
|
}
|
|
return opts
|
|
}
|
|
|
|
func (r *Reva) GetGRPCClientConfig() map[string]interface{} {
|
|
return map[string]interface{}{
|
|
"tls_mode": r.TLS.Mode,
|
|
"tls_cacert": r.TLS.CACert,
|
|
}
|
|
}
|