Skip to content
This repository has been archived by the owner on Aug 12, 2022. It is now read-only.

Commit

Permalink
feat/implementation of parallel resource limit (#103)
Browse files Browse the repository at this point in the history
* implementation of parallel resource limit
  • Loading branch information
amanenk authored Oct 30, 2021
1 parent a5b33ff commit d48afc8
Show file tree
Hide file tree
Showing 6 changed files with 292 additions and 150 deletions.
3 changes: 2 additions & 1 deletion cqproto/grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ func (g GRPCClient) FetchResources(ctx context.Context, request *FetchResourcesR
res, err := g.client.FetchResources(ctx, &internal.FetchResources_Request{
Resources: request.Resources,
PartialFetchingEnabled: request.PartialFetchingEnabled,
ParallelFetchingLimit: request.ParallelFetchingLimit,
})
if err != nil {
return nil, err
Expand Down Expand Up @@ -156,7 +157,7 @@ func (g *GRPCServer) ConfigureProvider(ctx context.Context, request *internal.Co
func (g *GRPCServer) FetchResources(request *internal.FetchResources_Request, server internal.Provider_FetchResourcesServer) error {
return g.Impl.FetchResources(
server.Context(),
&FetchResourcesRequest{Resources: request.GetResources(), PartialFetchingEnabled: request.PartialFetchingEnabled},
&FetchResourcesRequest{Resources: request.GetResources(), PartialFetchingEnabled: request.PartialFetchingEnabled, ParallelFetchingLimit: request.ParallelFetchingLimit},
&GRPCFetchResourcesServer{server: server},
)
}
Expand Down
Loading

0 comments on commit d48afc8

Please sign in to comment.