stream

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package stream is an in-process pub/sub hub used to fan out log lines and status updates to SSE subscribers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hub

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

func NewHub

func NewHub() *Hub

func (*Hub) Publish

func (h *Hub) Publish(topic, msg string)

Publish sends msg to all subscribers of topic. Slow subscribers drop messages.

func (*Hub) Subscribe

func (h *Hub) Subscribe(topic string) (<-chan string, func())

Subscribe returns a channel of messages for topic and an unsubscribe func.

Jump to

Keyboard shortcuts

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