Documentation ¶
Overview ¶
Package seenstate holds implementations of the SeenState that the client session uses to keep track of what messages it has seen.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SeenState ¶
type SeenState interface { // Set() (re)sets the given level to the given value. SetLevel(level string, top int64) error // GetAll() returns a "simple" map of the current levels. GetAllLevels() (map[string]int64, error) // FilterBySeen filters notifications already seen, keep track // of them as well. FilterBySeen([]protocol.Notification) ([]protocol.Notification, error) // Close closes state. Close() }
func NewSeenState ¶
NewSeenState returns an implementation of SeenState that is memory-based and does not save state.
func NewSqliteSeenState ¶
NewSqliteSeenState returns an implementation of SeenState that keeps and persists the state in an sqlite database.
Click to show internal directories.
Click to hide internal directories.