add: chat service
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
package svc
|
||||
|
||||
import (
|
||||
"juwan-backend/app/chat/api/internal/config"
|
||||
"juwan-backend/app/chat/chatcore"
|
||||
|
||||
"github.com/wwweww/go-wst/stateless"
|
||||
)
|
||||
|
||||
type ServiceContext struct {
|
||||
Config config.Config
|
||||
Store *chatcore.Store
|
||||
MsgStore *stateless.MemoryStore
|
||||
}
|
||||
|
||||
func NewServiceContext(c config.Config) *ServiceContext {
|
||||
return &ServiceContext{
|
||||
Config: c,
|
||||
Store: chatcore.NewStore(),
|
||||
MsgStore: stateless.NewMemoryStore(),
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user