Documentation
¶
Overview ¶
Package state provides persistent sessions and conversational FSM scenes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AttachSession ¶
func SessionMiddleware ¶
func SessionMiddleware(repo storage.SessionRepository, ttl time.Duration) middleware.Middleware
Types ¶
type FSM ¶
type FSM struct {
// contains filtered or unexported fields
}
FSM registers scenes and routes active sessions to their current step.
func NewFSM ¶
func NewFSM(repo storage.SessionRepository, ttl time.Duration) *FSM
NewFSM creates a scene manager backed by a session repository.
func (*FSM) Middleware ¶
func (f *FSM) Middleware() middleware.Middleware
type Scene ¶
type Scene struct {
// contains filtered or unexported fields
}
Scene is an ordered conversational flow of named steps.