Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion pkg/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,12 @@ func (c *Client) Fetch(ctx context.Context, request FetchRequest) (res *FetchRes

pLog.Info("requesting provider fetch", "partial_fetch_enabled", providerConfig.EnablePartialFetch)
fetchStart := time.Now()
stream, err := providerPlugin.Provider().FetchResources(ctx, &cqproto.FetchResourcesRequest{Resources: providerConfig.Resources, PartialFetchingEnabled: providerConfig.EnablePartialFetch})
stream, err := providerPlugin.Provider().FetchResources(ctx,
&cqproto.FetchResourcesRequest{
Resources: providerConfig.Resources,
PartialFetchingEnabled: providerConfig.EnablePartialFetch,
ParallelFetchingLimit: providerConfig.MaxParallelResourceFetchLimit,
})
if err != nil {
return err
}
Expand Down
13 changes: 7 additions & 6 deletions pkg/config/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ import (
)

type Provider struct {
Name string `hcl:"name,label"`
Alias string `hcl:"alias,optional"`
EnablePartialFetch bool `hcl:"enable_partial_fetch,optional"`
Resources []string `hcl:"resources,optional"`
Env []string `hcl:"env,optional"`
Configuration []byte
Name string `hcl:"name,label"`
Alias string `hcl:"alias,optional"`
EnablePartialFetch bool `hcl:"enable_partial_fetch,optional"`
Resources []string `hcl:"resources,optional"`
Env []string `hcl:"env,optional"`
Configuration []byte
MaxParallelResourceFetchLimit uint64 `hcl:"max_parallel_resource_fetch_limit"`
}

func decodeProviderBlock(block *hcl.Block, ctx *hcl.EvalContext, existingProviders map[string]bool) (*Provider, hcl.Diagnostics) {
Expand Down