26 lines
473 B
Go
26 lines
473 B
Go
|
package feta
|
||
|
|
||
|
import "time"
|
||
|
import "github.com/rs/zerolog/log"
|
||
|
|
||
|
type tootIngester struct {
|
||
|
inbound chan *toot
|
||
|
}
|
||
|
|
||
|
func newTootIngester() *tootIngester {
|
||
|
ti := new(tootIngester)
|
||
|
ti.inbound = make(chan *toot, 1)
|
||
|
return ti
|
||
|
}
|
||
|
|
||
|
func (ti *tootIngester) getDeliveryChannel() chan *toot {
|
||
|
return ti.inbound
|
||
|
}
|
||
|
|
||
|
func (ti *tootIngester) ingest() {
|
||
|
log.Info().Msg("tootIngester starting")
|
||
|
for {
|
||
|
time.Sleep(1 * time.Second) // FIXME do something
|
||
|
}
|
||
|
}
|