websockets.cli
Attributes
Functions
|
Starts the global websocket server. |
|
Listens for application-bound broadcasts from the websocket server. |
|
Shows the global status of the websocket server. |
|
Broadcast to all application-bound connected clients. |
Module Contents
- websockets.cli.serve(group_context: onegov.core.cli.core.GroupContext, host: str | None, port: int | None, token: str | None, sentry_dsn: str | None, sentry_environment: str | None, sentry_release: str | None) None [source]
Starts the global websocket server.
Takes the configuration from the first found app if missing.
onegov-websockets serve
- websockets.cli.listen(group_context: onegov.core.cli.core.GroupContext, url: str | None, schema: str | None, channel: str | None, private: bool) Callable[[CoreRequest, WebsocketsApp], None] [source]
Listens for application-bound broadcasts from the websocket server.
Requires either the selection of a websockets-enabled application or passing the optional parameters url and schema.
onegov-websockets –select ‘/onegov_org/govikon’ listen
- websockets.cli.status(group_context: onegov.core.cli.core.GroupContext, url: str | None, token: str | None) Callable[[CoreRequest, WebsocketsApp], None] [source]
Shows the global status of the websocket server.
Requires either the selection of a websockets-enabled application or passing the optional parameters.
onegov-websockets –select ‘/onegov_org/govikon’ status
- websockets.cli.broadcast(group_context: onegov.core.cli.core.GroupContext, message: str, url: str | None, schema: str | None, token: str | None, channel: str | None, private: bool) Callable[[CoreRequest, WebsocketsApp], None] [source]
Broadcast to all application-bound connected clients.
Requires either the selection of a websockets-enabled application or passing the optional parameters.
onegov-websockets –select ‘/onegov_org/govikon’ broadcast ‘{“event”:”refresh”,”path”:”events/abcd”}’