equinix / equinix-sdk-go

Golang client for Equinix APIs
https://deploy.equinix.com/labs/equinix-sdk-go
MIT License
2 stars 4 forks source link

[Metal] pagination does not pass context into the looped API calls #12

Open displague opened 6 months ago

displague commented 6 months ago

This could prevent cancelation

ctreatma commented 6 months ago

Can you provide links to the code that should be passing context but isn't? Do you have a code example that demonstrates the loss of context?

ctreatma commented 5 months ago

In general, request objects have a ctx property that tracks the specified context; the auto-pagination works by updating the page parameter of the request and then executing the request, so I would expect the context to be held across all requests.

For example, here's the definition of the ApiFindProjectsRequest, and here's the ExecuteWithPagination method of that request.