ncw / swift

Go language interface to Swift / Openstack Object Storage / Rackspace cloud files (golang)
MIT License
310 stars 107 forks source link

Add support for passing context to API calls #161

Closed FUSAKLA closed 3 years ago

FUSAKLA commented 3 years ago

Hi, I have PR ready to be merged to the Thanos project to use your library for accessing Swift, but we are a bit concerned about lack of support for context cancellation. We use widely setting timeouts for the whole operations in the system and would be really handy if the library would be able to honor cancellation of the operations.

I'd be happy to send a PR if you would accept this feature and would agree on how it should be added.

Thanks for any info and your work on the library!

ncw commented 3 years ago

Yes this library could do with contexts! It was made well before contexts were first invented alas!

I suggest we continue the discussion in #159 which is an existing issue about the same thing. It has some ideas as to what should be done - maybe you'll have a better one!

Yes, I'd accept a PR for this :-)

I'll close this issue - please head over to #159 :-)

FUSAKLA commented 3 years ago

Oh great, I'll move there then. Thanks for info. :)