sse

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const Type = "sse"

Variables

This section is empty.

Functions

func NewStaticHandler

func NewStaticHandler(e Event) http.HandlerFunc

func NewTickerHandler

func NewTickerHandler(interval time.Duration, maxEvents int) http.HandlerFunc

func WriteEvent

func WriteEvent(w io.Writer, e Event) error

Types

type Event

type Event struct {
	ID    string
	Event string
	Data  string
}

type Plugin added in v0.2.0

type Plugin struct{}

Plugin 为 SSE 保留 runtime graph 扩展位。 SSE 当前是 HTTP handler 形态,不独立监听端口,因此返回 no-op runtime server。

func (*Plugin) Build added in v0.2.0

func (*Plugin) Type added in v0.2.0

func (p *Plugin) Type() string

Jump to

Keyboard shortcuts

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