From 19c02d357366d820d2b046cf821685e2e7c3a7e9 Mon Sep 17 00:00:00 2001 From: Alexander Lazarenko Date: Wed, 28 May 2025 15:38:18 +0300 Subject: [PATCH] Quick --- api.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/api.go b/api.go index 9299bdb..ff3f412 100644 --- a/api.go +++ b/api.go @@ -295,11 +295,13 @@ func (a *Agate) saveCurrentSnapshotID() error { return os.WriteFile(a.currentIDFile, []byte(a.currentSnapshotID), 0644) } +func (a *Agate) Open() error { + return a.options.OpenFunc(a.GetActiveDir()) +} + // Close releases all resources used by the Agate instance. func (a *Agate) Close() error { - // Currently, we don't have a way to close the manager directly - // This would be a good addition in the future - return nil + return a.options.CloseFunc() } // StartServer starts a gRPC server to share snapshots.