ekster/cmd/eksterd/timeline.go
Peter Stuifzand a23b31cefe
All checks were successful
continuous-integration/drone/push Build is passing
Move timeline backend to own package
2019-03-23 20:42:13 +01:00

21 lines
418 B
Go

package main
import (
"p83.nl/go/ekster/pkg/timeline"
)
func (b *memoryBackend) getTimeline(channel string) timeline.Backend {
timelineType := "sorted-set"
if channel == "notifications" {
timelineType = "stream"
} else {
if setting, ok := b.Settings[channel]; ok {
if setting.ChannelType != "" {
timelineType = setting.ChannelType
}
}
}
return timeline.Create(channel, timelineType, b.pool)
}