Skip to content

Azure Blob Storage cache strategy for Go acme/autocert

License

Notifications You must be signed in to change notification settings

goenning/azcertcache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GoDoc Go Report Card

azcertcache

Azure Blob Storage cache for acme/autocert written in Go.

Example

containerName := "autocertcache"
cache, err := azcertcache.New("<account name>", "<account key>", 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

About

Azure Blob Storage cache strategy for Go acme/autocert

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages