httphandler

package
v1.4.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 31, 2026 License: Apache-2.0 Imports: 15 Imported by: 0 modules, 0 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.

README

Events

Event Operations

Events are the changes to the server's data. Each event has the schema and table which changed, and how it changed, as its action: INSERT, UPDATE or DELETE. An event says only what changed, not which rows, so a client which watches events reads what it needs again when one arrives.

GET /event

Watch events, as a stream of server-sent events, until the client closes the connection. Each event is named event, with the event as JSON as its data, and a ping event is sent when there are no events for a while, to keep the connection open. Only the events which match the schema, table and action query parameters are sent, each of which matches any event when it isn't set. Events which happen while a client is reading others can be dropped, if there are too many, and events which happen before it connects aren't sent. Returns 400 if the query is invalid, or 406 if the client doesn't accept text/event-stream.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterHandlers

func RegisterHandlers(manager *broadcaster.Manager, router *httprouter.Router) error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL