MCPcopy Create free account
hub / github.com/daodst/chat / ApplicationServiceWorkerState

Struct ApplicationServiceWorkerState

appservice/types/types.go:30–37  ·  view source on GitHub ↗

ApplicationServiceWorkerState is a type that couples an application service, a lockable condition as well as some other state variables, allowing the roomserver to notify appservice workers when there are events ready to send externally to application services.

Source from the content-addressed store, hash-verified

28// roomserver to notify appservice workers when there are events ready to send
29// externally to application services.
30type ApplicationServiceWorkerState struct {
31 AppService config.ApplicationService
32 Cond *sync.Cond
33 // Events ready to be sent
34 EventsReady bool
35 // Backoff exponent (2^x secs). Max 6, aka 64s.
36 Backoff int
37}
38
39// NotifyNewEvents wakes up all waiting goroutines, notifying that events remain
40// in the event queue for this application service worker.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected