add: chat service

This commit is contained in:
wwweww
2026-04-24 20:43:53 +08:00
parent 4cc4c96b21
commit 756ca20c6d
43 changed files with 3035 additions and 0 deletions
@@ -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(),
}
}