mirror of
https://github.com/owncloud/ocis
synced 2026-04-25 17:25:21 +02:00
[full-ci] enhancement: use reva client pool selectors (#6452)
* enhancement: use reva client pool selectors register mock service to registry and pass tests * enhancement: bump reva * Fix a couple of linter issues --------- Co-authored-by: Ralf Haferkamp <rhaferkamp@owncloud.com>
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
|
||||
gateway "github.com/cs3org/go-cs3apis/cs3/gateway/v1beta1"
|
||||
"github.com/cs3org/reva/v2/pkg/events"
|
||||
"github.com/cs3org/reva/v2/pkg/rgrpc/todo/pool"
|
||||
"github.com/go-chi/chi/v5"
|
||||
"github.com/jellydator/ttlcache/v3"
|
||||
libregraph "github.com/owncloud/libre-graph-api-go"
|
||||
@@ -62,7 +63,7 @@ type Graph struct {
|
||||
logger *log.Logger
|
||||
identityBackend identity.Backend
|
||||
identityEducationBackend identity.EducationBackend
|
||||
gatewayClient gateway.GatewayAPIClient
|
||||
gatewaySelector pool.Selectable[gateway.GatewayAPIClient]
|
||||
roleService RoleService
|
||||
permissionsService Permissions
|
||||
specialDriveItemsCache *ttlcache.Cache[string, interface{}]
|
||||
@@ -86,11 +87,6 @@ func (g Graph) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
g.mux.ServeHTTP(w, r)
|
||||
}
|
||||
|
||||
// GetGatewayClient returns a gateway client to talk to reva
|
||||
func (g Graph) GetGatewayClient() gateway.GatewayAPIClient {
|
||||
return g.gatewayClient
|
||||
}
|
||||
|
||||
func (g Graph) publishEvent(ev interface{}) {
|
||||
if g.eventsPublisher != nil {
|
||||
if err := events.Publish(g.eventsPublisher, ev); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user