amzn / smoke-aws-credentials

A library to obtain and assume automatically rotating AWS IAM roles written in the Swift programming language.
Apache License 2.0
19 stars 14 forks source link

Support for async credentials shutdown. #27

Closed tachyonics closed 2 years ago

tachyonics commented 2 years ago

Issue #, if available:

Description of changes:

  1. Add async shutdown method for StoppableCredentialsProvider.
  2. Add a syncShutdown method for StoppableCredentialsProvider and deprecate the existing close method for clarity and consistency.

This is not a breaking change; the additional methods on the StoppableCredentialsProvider protocol have default implementations. The async shutdown method default implementation will fatal error; conforming types outside of this package will need to override this implementation if they want to move to using async shutdown. The conforming types in this package override the default implementation.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.