-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update and format package-level comments. (#258)
* Update version * Fix grammar and style. * Update and format packages' documentation.
- Loading branch information
1 parent
6a04c22
commit a1ba025
Showing
66 changed files
with
563 additions
and
219 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.96.0 | ||
1.96.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,29 @@ | ||
/* | ||
Package awssecretcache provides a simple client to retrieve and cache secrets from AWS Secrets Manager. | ||
To improve speed and reduce costs, the client uses a thread-safe local single-flight cache | ||
that avoids duplicate calls for the same secret. | ||
The cache has a maximum size and a time-to-live (TTL) for each entry. | ||
Duplicate calls for the same secret will wait for the first lookup to complete and return the same value. | ||
Package awssecretcache provides a simple client for retrieving and caching | ||
secrets from AWS Secrets Manager. | ||
This package is based on the official aws-sdk-go-v2 library. | ||
This package is based on the official aws-sdk-go-v2 library | ||
(https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/secretsmanager) and | ||
implements github.com/Vonage/gosrvlib/pkg/sfcache to provide a simple, local, | ||
thread-safe, fixed-size, and single-flight cache for AWS Secrets lookup calls. | ||
Reference: https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/secretsmanager. | ||
By caching previous values, awssecretcache improves the performance of secrets | ||
lookup by eliminating the need for repeated expensive requests. | ||
This package provides a local in-memory cache with a configurable maximum number | ||
of entries. The fixed size helps with efficient memory management and prevents | ||
excessive memory usage. The cache is thread-safe, allowing concurrent access | ||
without the need for external synchronization. It efficiently handles concurrent | ||
requests by sharing results from the first lookup, ensuring that only one | ||
request makes the expensive call, and avoiding unnecessary network load or | ||
resource starvation. Duplicate calls for the same key will wait for the first | ||
call to complete and return the same value. | ||
Each cache entry has a set time-to-live (TTL), so it will automatically expire. | ||
However, it is also possible to force the removal of a specific entry or reset | ||
the entire cache. | ||
This package is ideal for any Go application that heavily relies on AWS Secrets | ||
lookups. | ||
*/ | ||
package awssecretcache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.