events

package
v1.44.4 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2026 License: MIT Imports: 6 Imported by: ? 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.

Documentation

Overview

Package events tells the open web apps of an account that its notes changed, so they read them again: an agent working through the MCP or the CLI shows its changes live. Every write goes through the API, so the API is the one to tell, not the base.

Index

Constants

View Source
const ClientHeader = "Tide-Client"

ClientHeader names the app that sent a request: its own changes come back with its name, and it skips them.

Variables

This section is empty.

Functions

func Handler

func Handler() http.Handler

Handler streams the account's changes as server-sent events, one "data: <client>" each, until the app leaves.

@Summary	The account's changes, live (server-sent events)
@Tags		notes
@Produce	text/event-stream
@Success	200	{string}	string	"data: <the Tide-Client header of the change>"
@Failure	401	{object}	respond.Failure
@Router		/api/events [get]

func New

func New(next http.Handler) http.Handler

New runs next, then tells the account's streams when the request changed something: a write that succeeded. It goes after auth, which puts the account in the context.

Types

This section is empty.

Jump to

Keyboard shortcuts

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