Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Composer ¶
func (*Composer[T]) Handle ¶
func (c *Composer[T]) Handle(handler HandlerFunc[T], filters ...filter.Filter[T])
Handle adds a handler to the Composer.
func (*Composer[T]) Use ¶
func (c *Composer[T]) Use(handlers ...HandlerFunc[T])
Use adds handlers to the Composer.
type Context ¶
type Context[T any] struct { context.Context driver.Emitter event.Replyer Time int64 SelfId int64 Msg T Log *slog.Logger // contains filtered or unexported fields }
func NewContext ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
func (*Engine) SetConsumerNum ¶
func (*Engine) SetTaskLen ¶
type EventHandler ¶
func OnEvent ¶
func OnEvent[T event.Eventer](engine *Engine) *EventHandler[T]
start handler all self event
func OnSelfsEvent ¶
func OnSelfsEvent[T event.Eventer](engine *Engine, selfIds ...int64) *EventHandler[T]
start handler evnet by selfIds
type FilterChain ¶
type HandlerEnd ¶
type HandlerEnd[T any] struct { // contains filtered or unexported fields }
type HandlerFunc ¶
func NewConversation ¶
func NewConversation[T SessionMsg](handler SessionHandler[T]) HandlerFunc[T]
Start a conversation session with a handler.
func Recovery ¶
func Recovery[T any]() HandlerFunc[T]
type HandlersChain ¶
type HandlersChain[T any] []HandlerFunc[T]
type SessionHandler ¶
type SessionMsg ¶
type SessionStore ¶
func (*SessionStore[T]) Del ¶
func (s *SessionStore[T]) Del(key string)
Click to show internal directories.
Click to hide internal directories.
