Рыба проекта. Минимальная функциональность
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
package domain
|
||||
|
||||
import "io"
|
||||
|
||||
// Sink defines the contract for a storage sink that supports atomic two-phase writes.
|
||||
type Sink interface {
|
||||
Begin(key string) (SinkTx, error)
|
||||
List(prefix string) ([]string, error)
|
||||
Remove(key string) error
|
||||
}
|
||||
|
||||
// SinkTx represents an in-progress write transaction.
|
||||
type SinkTx interface {
|
||||
io.Writer
|
||||
Commit() error
|
||||
Abort() error
|
||||
}
|
||||
Reference in New Issue
Block a user