Check message stores implement expected interfaces
This commit is contained in:
parent
b078ccaf7a
commit
f6875521ea
@ -63,6 +63,9 @@ type fsMessageStore struct {
|
||||
files map[string]*os.File // indexed by entity
|
||||
}
|
||||
|
||||
var _ messageStore = (*fsMessageStore)(nil)
|
||||
var _ chatHistoryMessageStore = (*fsMessageStore)(nil)
|
||||
|
||||
func newFSMessageStore(root, username string) *fsMessageStore {
|
||||
return &fsMessageStore{
|
||||
root: filepath.Join(root, escapeFilename.Replace(username)),
|
||||
|
@ -41,6 +41,8 @@ type memoryMessageStore struct {
|
||||
buffers map[ringBufferKey]*messageRingBuffer
|
||||
}
|
||||
|
||||
var _ messageStore = (*memoryMessageStore)(nil)
|
||||
|
||||
func newMemoryMessageStore() *memoryMessageStore {
|
||||
return &memoryMessageStore{
|
||||
buffers: make(map[ringBufferKey]*messageRingBuffer),
|
||||
|
Loading…
Reference in New Issue
Block a user