gamalan / caddy-tlsredis

Redis Storage using for Caddy TLS Data
Apache License 2.0
95 stars 31 forks source link

Update storageredis.go #33

Closed mholt closed 2 years ago

mholt commented 2 years ago

Recent changes (not yet tagged) in CertMagic add context.Context to the Storage interface methods, as well as make use of the new fs.ErrNotExist error value.

Because it's a breaking change in CertMagic (which is not yet a stable 1.0), I'm submitting this PR as a courtesy. It's a quick edit I made manually in the browser, so it may need a little massaging if I missed something. Let me know if you have any questions!

(I see you have a different way of getting context. You may want to consider using the more local context passed into these methods. I just made your signatures compatible so they satisfy the updated interfaces.)

gamalan commented 2 years ago

Is this change will come in effect for caddy 2.5 @mholt?

mholt commented 2 years ago

Not sure yet. That'd be nice, but I'm also tagging 2.5 beta this week, so maybe it depends on how many implementations get updated in time. I tried to make it pretty easy...