Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrBadScan = errors.New("bad scan of data type")
View Source
var ErrBadString = errors.New("expected either a string or a []byte")
Functions ¶
Types ¶
type MemEngine ¶
MemEngine is an implementation of a gregor StateMachine that just keeps all incoming messages in a hash table, with one entry per user. It doesn't do anything fancy w/r/t indexing Items, so just iterates over all of them every time a dismissal or a state dump comes in. Used mainly for testing when SQLite isn't available.
func NewMemEngine ¶
func NewMemEngine(f gregor.ObjFactory, cl clockwork.Clock) *MemEngine
NewMemEngine makes a new MemEngine with the given object factory and the potentially fake clock (or a real clock if not testing).
func (*MemEngine) InBandMessagesSince ¶
func (m *MemEngine) InBandMessagesSince(u gregor.UID, d gregor.DeviceID, t gregor.TimeOrOffset) ([]gregor.InBandMessage, error)
type SQLEngine ¶
type SQLEngine struct {
// contains filtered or unexported fields
}
func NewSQLEngine ¶
func (*SQLEngine) InBandMessagesSince ¶
func (s *SQLEngine) InBandMessagesSince(u gregor.UID, d gregor.DeviceID, t gregor.TimeOrOffset) ([]gregor.InBandMessage, error)
Click to show internal directories.
Click to hide internal directories.