start messing about with streaming api

This commit is contained in:
tsmethurst 2021-06-17 19:20:08 +02:00
commit 0cee5aa569
9 changed files with 241 additions and 2 deletions

View file

@ -0,0 +1,22 @@
package streaming
import (
"github.com/gorilla/websocket"
"github.com/superseriousbusiness/gotosocial/internal/gtserror"
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
)
func (p *processor) StreamForAccount(c *websocket.Conn, account *gtsmodel.Account, streamType string) gtserror.WithCode {
v, loaded := p.streamMap.LoadOrStore(account.ID, sync.Slice)
if loaded {
}
return nil
}
type streams struct {
accountID string
}