Documentation
¶
Overview ¶
Package session provides session lifecycle guards for the WeChat iLink bot.
Index ¶
Constants ¶
View Source
const ( // PauseDuration is how long to back off after receiving a session expired (-14) error. PauseDuration = 60 * time.Minute )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Guard ¶
type Guard struct {
// contains filtered or unexported fields
}
Guard tracks whether a bot session is currently paused due to expiry.
func (*Guard) AssertActive ¶
AssertActive returns an error if the session is currently paused.
func (*Guard) IsPaused ¶
IsPaused reports whether the session is still within its pause window. Expired pauses are auto-cleared.
Click to show internal directories.
Click to hide internal directories.