Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNoSuchToken = errors.New("no such token")
)
Errors returned by Datastore.
Functions ¶
This section is empty.
Types ¶
type Datastore ¶
type Datastore interface { HealthChecker Inserter Lister }
Datastore is the main interface into the db package.
type HealthChecker ¶
HealthChecker is the interface for performming healthchecks against the Datastore.
type MemoryDB ¶
type MemoryDB struct {
// contains filtered or unexported fields
}
MemoryDB implements an in memory Datastore.
func NewInMemory ¶
NewInMemory creates a new in memory Datastore.
func (*MemoryDB) Healthcheck ¶
Healthcheck always return true.
type RedisDB ¶
type RedisDB struct {
// contains filtered or unexported fields
}
RedisDB is the redis implementation of the Datastore interface.
func NewInRedis ¶
NewInRedis creates an instance of RedisDB.
func (*RedisDB) Healthcheck ¶
Healthcheck performs a PING against redis.
Click to show internal directories.
Click to hide internal directories.