mtsatellite/backend.go

20 lines
437 B
Go
Raw Normal View History

2014-08-03 15:59:56 +02:00
// Copyright 2014 by Sascha L. Teichmann
// Use of this source code is governed by the MIT license
// that can be found in the LICENSE file.
package main
type Session interface {
Fetch(hash, key []byte) ([]byte, error)
InTransaction() bool
Store(hash, key, value []byte) (bool, error)
BeginTransaction() error
2014-08-03 14:52:24 +02:00
CommitTransaction() error
Close() error
}
type Backend interface {
NewSession() (Session, error)
Shutdown() error
}