Documentation ¶
Overview ¶
Package datastore implements an interface to a redis datastore
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IdGenerator ¶
type RedisEventStore ¶
type RedisEventStore struct {
// contains filtered or unexported fields
}
func NewRedisEventStore ¶
func NewRedisEventStore(addr, port string) (RedisEventStore, error)
NewRedisEventStore opens a TCP connection to a redis server at the given address and port. It returns an intialised RedisEventStore struct as well as any error encountered.
func (*RedisEventStore) CountInTimeRange ¶
func (store *RedisEventStore) CountInTimeRange(name string, start, end int64) (int, error)
CountInTimeRange returns an integer count of all events with a given name and timestamp between `start` and `end`, as well as any error encountered.
func (*RedisEventStore) Names ¶
func (store *RedisEventStore) Names() ([]string, error)
Names returns a string slice containing all previously stored event names, as well as any error encountered.
type RedisIdGenerator ¶
type RedisIdGenerator struct {
// contains filtered or unexported fields
}
func (*RedisIdGenerator) Next ¶
func (gen *RedisIdGenerator) Next() (int64, error)
Click to show internal directories.
Click to hide internal directories.