publisher

package
v0.17.2 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package publisher provides a standalone pub/sub server on a fixed port. Browser bookmarklets publish page content; MCP sessions subscribe via long-poll. CRC: crc-Publisher.md | Seq: seq-publisher-lifecycle.md, seq-publish-subscribe.md

Index

Constants

View Source
const (
	DefaultAddr    = "localhost:25283"
	PollTimeout    = 60 * time.Second
	PublishTTL     = 20 * time.Millisecond
	IdleTimeout    = 5 * time.Minute
	IdleCheckEvery = 10 * time.Second
	MaxBodySize    = 1 << 20 // 1MB
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Publisher

type Publisher struct {
	// contains filtered or unexported fields
}

Publisher is a topic-based pub/sub HTTP server.

func New

func New(addr string) *Publisher

New creates a Publisher bound to the given address.

func (*Publisher) ListenAndServe

func (p *Publisher) ListenAndServe() error

ListenAndServe starts the HTTP server and idle watchdog. Blocks until the server shuts down.

Jump to

Keyboard shortcuts

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