Initial QSfera import
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
package shared
|
||||
|
||||
import (
|
||||
"github.com/opencloud-eu/reva/v2/pkg/rgrpc/todo/pool"
|
||||
)
|
||||
|
||||
var defaultRevaConfig = Reva{
|
||||
Address: "qsfera.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]any {
|
||||
return map[string]any{
|
||||
"tls_mode": r.TLS.Mode,
|
||||
"tls_cacert": r.TLS.CACert,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user