Documentation ¶
Index ¶
- func FilterFutureDismissals(msgs []gregor.InBandMessage, allmsgs map[string]gregor.InBandMessage, ...) []gregor.InBandMessage
- type LocalDb
- type MemEngine
- func (m *MemEngine) Clear() error
- func (m *MemEngine) Clock() clockwork.Clock
- func (m *MemEngine) ConsumeLocalDismissal(ctx context.Context, u gregor.UID, msgID gregor.MsgID) error
- func (m *MemEngine) ConsumeMessage(ctx context.Context, msg gregor.Message) (gregor.Message, error)
- func (m *MemEngine) ConsumeOutboxMessage(ctx context.Context, u gregor.UID, msg gregor.Message) error
- func (m *MemEngine) DeleteReminder(ctx context.Context, r gregor.ReminderID) error
- func (m *MemEngine) InBandMessagesSince(ctx context.Context, u gregor.UID, d gregor.DeviceID, t time.Time) ([]gregor.InBandMessage, error)
- func (m *MemEngine) InitLocalDismissals(ctx context.Context, u gregor.UID, msgIDs []gregor.MsgID) error
- func (m *MemEngine) InitOutbox(ctx context.Context, u gregor.UID, msgs []gregor.Message) error
- func (m *MemEngine) InitState(s gregor.State) error
- func (m *MemEngine) IsEphemeral() bool
- func (m *MemEngine) LatestCTime(ctx context.Context, u gregor.UID, d gregor.DeviceID) *time.Time
- func (m *MemEngine) LocalDismissals(ctx context.Context, u gregor.UID) (res []gregor.MsgID, err error)
- func (m *MemEngine) ObjFactory() gregor.ObjFactory
- func (m *MemEngine) Outbox(ctx context.Context, u gregor.UID) ([]gregor.Message, error)
- func (m *MemEngine) ReminderLockDuration() time.Duration
- func (m *MemEngine) Reminders(ctx context.Context, maxReminders int) (gregor.ReminderSet, error)
- func (m *MemEngine) RemoveFromOutbox(ctx context.Context, u gregor.UID, id gregor.MsgID) error
- func (m *MemEngine) State(ctx context.Context, u gregor.UID, d gregor.DeviceID, t gregor.TimeOrOffset) (gregor.State, error)
- func (m *MemEngine) StateByCategoryPrefix(ctx context.Context, u gregor.UID, d gregor.DeviceID, t gregor.TimeOrOffset, ...) (gregor.State, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilterFutureDismissals ¶
func FilterFutureDismissals(msgs []gregor.InBandMessage, allmsgs map[string]gregor.InBandMessage, cutoff time.Time) []gregor.InBandMessage
Types ¶
type LocalDb ¶ added in v1.0.39
type LocalDb struct {
libkb.Contextified
}
func NewLocalDB ¶ added in v1.0.39
func NewLocalDB(g *libkb.GlobalContext) *LocalDb
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 ¶
NewMemEngine makes a new MemEngine with the given object factory and the potentially fake clock (or a real clock if not testing).
func (*MemEngine) ConsumeLocalDismissal ¶ added in v1.0.39
func (*MemEngine) ConsumeMessage ¶
func (*MemEngine) ConsumeOutboxMessage ¶
func (*MemEngine) DeleteReminder ¶
func (*MemEngine) InBandMessagesSince ¶
func (*MemEngine) InitLocalDismissals ¶ added in v1.0.39
func (*MemEngine) InitOutbox ¶
func (*MemEngine) IsEphemeral ¶
func (*MemEngine) LatestCTime ¶
func (*MemEngine) LocalDismissals ¶ added in v1.0.39
func (*MemEngine) ObjFactory ¶
func (m *MemEngine) ObjFactory() gregor.ObjFactory
func (*MemEngine) ReminderLockDuration ¶
func (*MemEngine) RemoveFromOutbox ¶
Click to show internal directories.
Click to hide internal directories.