Skip to content

Commit 846bf08

Browse files
committed
Lock and unlocl
1 parent 93a689d commit 846bf08

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

module.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ func (NomadStorage) CaddyModule() caddy.ModuleInfo {
2525
// Provision is called by Caddy to prepare the module
2626
func (ns *NomadStorage) Provision(ctx caddy.Context) error {
2727
ns.logger = ctx.Logger(ns).Sugar()
28-
ns.logger.Infof("Version 0.5 - TLS storage is using Nomad at %s", ns.Address)
28+
ns.logger.Infof("Version 0.6 - TLS storage is using Nomad at %s", ns.Address)
2929

3030
if prefix := os.Getenv(EnvNamePrefix); prefix != "" {
3131
ns.Prefix = prefix

storage.go

+10
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,16 @@ func (ns NomadStorage) Stat(ctx context.Context, key string) (certmagic.KeyInfo,
233233
return certmagic.KeyInfo{}, fmt.Errorf(msg)
234234
}
235235

236+
func (ns NomadStorage) Lock(ctx context.Context, key string) error {
237+
loggy("Locking")
238+
return nil
239+
}
240+
241+
func (ns NomadStorage) Unlock(ctx context.Context, key string) error {
242+
loggy("Unlocking")
243+
return nil
244+
}
245+
236246
func (ns *NomadStorage) createNomadClient() error {
237247
// get the default config
238248
nomadCfg := nomad.DefaultConfig()

0 commit comments

Comments
 (0)