https://github.com/goenning/azcertcache
Azure Blob Storage cache strategy for Go acme/autocert
https://github.com/goenning/azcertcache
autocert azure azure-blob-storage lets-encrypt
Last synced: about 2 months ago
JSON representation
Azure Blob Storage cache strategy for Go acme/autocert
- Host: GitHub
- URL: https://github.com/goenning/azcertcache
- Owner: goenning
- License: mit
- Created: 2019-01-25T21:39:20.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-06-07T19:38:02.000Z (almost 3 years ago)
- Last Synced: 2025-02-13T14:24:48.269Z (4 months ago)
- Topics: autocert, azure, azure-blob-storage, lets-encrypt
- Language: Go
- Size: 12.7 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://godoc.org/github.com/goenning/azcertcache) [](https://goreportcard.com/report/github.com/goenning/azcertcache)
# azcertcache
[Azure Blob Storage](https://azure.microsoft.com/en-us/services/storage/blobs/) cache for [acme/autocert](https://godoc.org/golang.org/x/crypto/acme/autocert) written in Go.
## Example
```go
containerName := "autocertcache"
cache, err := azcertcache.New("", "", containerName)
if err != nil {
// Handle error
}m := autocert.Manager{
Prompt: autocert.AcceptTOS,
Cache: cache,
}s := &http.Server{
Addr: ":https",
TLSConfig: &tls.Config{GetCertificate: m.GetCertificate},
}s.ListenAndServeTLS("", "")
```## Performance
This is just a reminder that autocert has an internal in-memory cache that is used before quering this long-term cache.
So you don't need to worry about your Azure Blob Storage instance being hit many times just to get the same certificate. It should only do once per process+key.## Thanks
Inspired by https://github.com/danilobuerger/autocert-s3-cache
## License
MIT