-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enhancement: introduce micro registry and client pool selectors #3939
Conversation
b9a4571
to
e275423
Compare
402e9ed
to
0f97a66
Compare
To make the linter somewhat happier. Also disable the 'depguard' linter for now.
ada11ab
to
cdb4ada
Compare
use selectors in sharesstorageprovider.go and let the selectors next fail if a service is unknown
Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
conf *config | ||
gateway gateway.GatewayAPIClient | ||
conf *config | ||
gatewaySelector pool.Selectable[gateway.GatewayAPIClient] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
expected ';', found '[' (and 10 more errors)
@@ -62,8 +62,8 @@ type config struct { | |||
} | |||
|
|||
type service struct { | |||
gateway gateway.GatewayAPIClient | |||
sharesProviderClient collaboration.CollaborationAPIClient | |||
gatewaySelector pool.Selectable[gateway.GatewayAPIClient] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
expected ';', found '[' (and 9 more errors)
@@ -271,7 +272,12 @@ func (h *DavHandler) Handler(s *svc) http.Handler { | |||
}) | |||
} | |||
|
|||
func getTokenStatInfo(ctx context.Context, client gatewayv1beta1.GatewayAPIClient, token string) (*provider.StatResponse, error) { | |||
func getTokenStatInfo(ctx context.Context, selector pool.Selectable[gatewayv1beta1.GatewayAPIClient], token string) (*provider.StatResponse, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing ',' in parameter list (and 2 more errors)
@@ -159,14 +160,14 @@ type LockSystem interface { | |||
} | |||
|
|||
// NewCS3LS returns a new CS3 based LockSystem. | |||
func NewCS3LS(c gateway.GatewayAPIClient) LockSystem { | |||
func NewCS3LS(s pool.Selectable[gateway.GatewayAPIClient]) LockSystem { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing ',' in parameter list (and 9 more errors)
@@ -144,7 +144,7 @@ type svc struct { | |||
davHandler *DavHandler | |||
favoritesManager favorite.Manager | |||
client *http.Client | |||
gwClient gateway.GatewayAPIClient | |||
gatewaySelector pool.Selectable[gateway.GatewayAPIClient] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
expected ';', found '[' (and 5 more errors)
@@ -39,15 +40,15 @@ type Downloader interface { | |||
} | |||
|
|||
type revaDownloader struct { | |||
gtw gateway.GatewayAPIClient | |||
httpClient *http.Client | |||
gatewaySelector pool.Selectable[gateway.GatewayAPIClient] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
expected ';', found '[' (and 2 more errors)
@@ -46,12 +47,12 @@ type Walker interface { | |||
} | |||
|
|||
type revaWalker struct { | |||
gtw gateway.GatewayAPIClient | |||
gatewaySelector pool.Selectable[gateway.GatewayAPIClient] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
expected ';', found '[' (and 2 more errors)
sharesProviderClient *cs3mocks.CollaborationAPIClient | ||
s sprovider.ProviderAPIServer | ||
gatewayClient *cs3mocks.GatewayAPIClient | ||
gatewaySelector pool.Selectable[gateway.GatewayAPIClient] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
expected ';', found '[' (and 10 more errors)
walker walker.Walker | ||
downloader downloader.Downloader | ||
config *Config | ||
gatewaySelector pool.Selectable[gateway.GatewayAPIClient] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
expected ';', found '[' (and 4 more errors)
sublog.Error().Err(err).Str("depth", cp.depth.String()).Msg("error executing path copy") | ||
w.WriteHeader(http.StatusInternalServerError) | ||
} | ||
w.WriteHeader(cp.successCode) | ||
} | ||
|
||
func (s *svc) executePathCopy(ctx context.Context, client gateway.GatewayAPIClient, w http.ResponseWriter, r *http.Request, cp *copy) error { | ||
func (s *svc) executePathCopy(ctx context.Context, selector pool.Selectable[gateway.GatewayAPIClient], w http.ResponseWriter, r *http.Request, cp *copy) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing ',' in parameter list (and 1 more errors)
Add the ability to use iterable client pools for the grpc service communication,
the underlying grpc client and connection is fetched randomly from the available services.
Todos: