certcache: log on actions being taken
This commit is contained in:
parent
a7ee9b1a06
commit
385d340027
|
@ -57,6 +57,8 @@ func (c *CertCache) Get(ctx context.Context, key string) ([]byte, error) {
|
|||
body = cert.Body
|
||||
}
|
||||
|
||||
log.Printf("certcache: fetched: %s", key)
|
||||
|
||||
return body, nil
|
||||
}
|
||||
|
||||
|
@ -70,6 +72,8 @@ func (c *CertCache) Put(ctx context.Context, key string, data []byte) error {
|
|||
Body: data,
|
||||
}
|
||||
|
||||
log.Printf("certcache: added: %s", key)
|
||||
|
||||
_, err := r.Table("certs").Insert(cert).RunWrite(c.s)
|
||||
return err
|
||||
}
|
||||
|
@ -79,5 +83,6 @@ func (c *CertCache) Put(ctx context.Context, key string, data []byte) error {
|
|||
func (c *CertCache) Delete(ctx context.Context, key string) error {
|
||||
_, err := r.Table("certs").Get(key).Delete().Run(c.s)
|
||||
|
||||
log.Printf("certcache: deleted: %s", key)
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue