Use a type block for backend interfaces.

This commit is contained in:
Sascha L. Teichmann 2014-08-19 11:11:41 +02:00
parent efe6c6abb8
commit 37eb407572

View File

@ -4,17 +4,19 @@
package main
type Session interface {
Fetch(hash, key []byte) ([]byte, error)
InTransaction() bool
Store(hash, key, value []byte) (bool, error)
AllKeys(hash []byte) (chan []byte, int, error)
BeginTransaction() error
CommitTransaction() error
Close() error
}
type (
Session interface {
Fetch(hash, key []byte) ([]byte, error)
InTransaction() bool
Store(hash, key, value []byte) (bool, error)
AllKeys(hash []byte) (chan []byte, int, error)
BeginTransaction() error
CommitTransaction() error
Close() error
}
type Backend interface {
NewSession() (Session, error)
Shutdown() error
}
Backend interface {
NewSession() (Session, error)
Shutdown() error
}
)