From 66e4ea082bb70fcb7cbff1b112bcc85692862824 Mon Sep 17 00:00:00 2001 From: Christine Dodrill Date: Fri, 28 Apr 2017 21:18:19 -0700 Subject: [PATCH] database: add Close() --- Procfile | 3 --- database/boltdb.go | 4 ++++ database/storage.go | 2 ++ 3 files changed, 6 insertions(+), 3 deletions(-) delete mode 100644 Procfile diff --git a/Procfile b/Procfile deleted file mode 100644 index da20d7e..0000000 --- a/Procfile +++ /dev/null @@ -1,3 +0,0 @@ -route: ./route -httpagent: ./httpagent -token 850045ee-5bec-4c14-9392-a4aa85ec3220 -domain embody-fire-shad.route.xeserv.us -server embody-fire-shad.route.xeserv.us:36971 -method tcp -helloserver: ./helloserver -port 9090 diff --git a/database/boltdb.go b/database/boltdb.go index d2802c5..435aa1f 100644 --- a/database/boltdb.go +++ b/database/boltdb.go @@ -241,3 +241,7 @@ func (b *BoltDBStorage) DeleteCert(ct context.Context, key string) error { return b.db.DeleteStruct(&cc) } + +func (b *BoltDBStorage) Close() error { + return b.db.Close() +} diff --git a/database/storage.go b/database/storage.go index 5f597d5..8d7a826 100644 --- a/database/storage.go +++ b/database/storage.go @@ -25,6 +25,8 @@ type Storage interface { GetCert(ctx context.Context, key string) ([]byte, error) PutCert(ctx context.Context, key string, data []byte) error DeleteCert(ctx context.Context, key string) error + + Close() error } type storageManager struct {