Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConfigProvider ¶
type ConfigProvider func() (appID, appSecret string)
type Listener ¶
type Listener struct {
// contains filtered or unexported fields
}
func NewListener ¶
func NewListener(handler messaging.EventHandler, configProvider ConfigProvider) *Listener
NewListener constructs a Listener. configProvider is required — callers must supply a function that returns (app_id, app_secret) at dispatch time so credential rotation doesn't require re-instantiating the listener at all (see Manager.startLocked). Tests that only exercise decoding may instantiate Listener directly without going through NewListener.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func NewManager(handler messaging.EventHandler, configFn ConfigProvider) *Manager
func (*Manager) Stop ¶
func (m *Manager) Stop()
Stop cancels the current listener. Called from the process shutdown path (cmd/web/main.go via Handler.StopIMListeners) so the WebSocket close races with HTTP shutdown deterministically — without it the read loop's "use of closed network connection" log fires after the rest of the shutdown sequence has already moved on. Also mirrors pkg/messaging/wechat.Manager.Stop so upstream code can treat both platforms symmetrically.
type Replier ¶
type Replier struct {
// contains filtered or unexported fields
}
func NewReplier ¶
func NewReplier(configFn ConfigProvider) *Replier