Commit e81f490a authored by Kirill Smelkov's avatar Kirill Smelkov

go/zodb: Decouple IStorage from IStorageDriver

IStorage is what we give to users. IStorageDriver is what is internally
provided by drivers to common ZODB infrastructure that in turn
implements easy-to-use IStorage interface for clients.

So far those two were close to each other. However we need to decouple
them, or else every driver will have to implement the same high-level
functionality that users expect from IStorage. What we want to do is to
offload drivers from that work.

In the next patches IStorageDriver will evolve with driver
specific-bits, while IStorage will evolve with higher-level stuff
that clients will use.
parent 46636b16
// Copyright (C) 2016-2018 Nexedi SA and Contributors.
// Copyright (C) 2016-2019 Nexedi SA and Contributors.
// Kirill Smelkov <kirr@nexedi.com>
//
// This program is free software: you can Use, Study, Modify and Redistribute
......@@ -322,8 +322,14 @@ func (e *OpError) Cause() error {
// IStorage is the interface provided by opened ZODB storage.
type IStorage interface {
IStorageDriver
// same as in IStorageDriver
URL() string
Close() error
LastTid(context.Context) (Tid, error)
Loader
Iterator
// additional to IStorageDriver
Prefetcher
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment