This commit is contained in:
Александр Лазаренко 2025-05-28 15:38:18 +03:00
parent 1f837afadc
commit 19c02d3573
Signed by: Kerblif
GPG Key ID: 5AFAD6640F4670C3

8
api.go
View File

@ -295,11 +295,13 @@ func (a *Agate) saveCurrentSnapshotID() error {
return os.WriteFile(a.currentIDFile, []byte(a.currentSnapshotID), 0644) 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. // Close releases all resources used by the Agate instance.
func (a *Agate) Close() error { func (a *Agate) Close() error {
// Currently, we don't have a way to close the manager directly return a.options.CloseFunc()
// This would be a good addition in the future
return nil
} }
// StartServer starts a gRPC server to share snapshots. // StartServer starts a gRPC server to share snapshots.