Discover Packages
github.com/mutablelogic/go-server
broadcaster
httphandler
package
Version:
v1.8.8
Opens a new window with list of versions in this module.
Published: Nov 15, 2026
License: Apache-2.0
Opens a new window with license information.
Imports: 13
Opens a new window with list of imports.
Imported by: 5 modules, 5 packages
The first number is the count of modules that contain a package that imports this one.
The module count is a better indicator of popularity than the package count.
A module with 100 importing packages is counted only once instead of 100 times,
reflecting the fact that the choice to use the package was likely made only once,
not 100 times.
A '?' means that the value hasn't been computed yet.
Opens a new window with list of known importers.
README
README
¶
Broadcaster API
Change Operations
Changes are streamed to a client as they happen, such as to the rows of the server's tables.
Each change has an action, which is create, update or delete.
It has the schema and table which changed, and the row, or rows, which changed, such as by an identifier, when it says.
It has data when the table says more of the change, such as a row's new serial, {"serial":3}.
The server says which schemas and tables it publishes changes of.
GET /changes
Watch the changes, as a stream of server-sent events, until the client closes the connection.
Each change is a change event, whose data is the change, as JSON, such as {"action":"create","schema":"llm","table":"provider","row":"ollama"}.
With schema, table or action, only the changes with them are streamed, such as ?table=session&action=update. Each matches any when it's left out.
The stream is watching once it has started, so a client which then loads what it shows misses no changes.
When the server is stopping, a shutdown event is sent, and the stream ends, as there will be no more changes.
A client which doesn't read its changes has up to 16 kept for it, and misses those after them.
Returns 400 if the action isn't create, update or delete, 406 if the client doesn't accept text/event-stream, or 503 if the server is stopping.
Expand ▾
Collapse ▴
Documentation
¶
Package httphandler has the broadcaster's HTTP API, which streams its
changes to clients
Tag is the tag of the broadcaster's API, which a server with tag groups
adds to one of them, as Redoc doesn't show a tag which isn't in a group,
once there are groups, such as with:
router.Spec().AddTagGroup("Server", httphandler.Tag)
RegisterHandlers registers the broadcaster's API with the router, which
streams its changes at changes, with Tag
Source Files
¶
Click to show internal directories.
Click to hide internal directories.