sse

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ContentEventStream = "text/event-stream"
)

Variables

This section is empty.

Functions

func ParseDataStream

func ParseDataStream(body io.Reader) iter.Seq2[[]byte, error]

Types

type SSEWriter

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

func NewWriter

func NewWriter(w http.ResponseWriter) (*SSEWriter, error)

func (*SSEWriter) WriteData

func (w *SSEWriter) WriteData(ctx context.Context, data []byte) error

func (*SSEWriter) WriteHeaders

func (w *SSEWriter) WriteHeaders()

func (*SSEWriter) WriteKeepAlive

func (w *SSEWriter) WriteKeepAlive(ctx context.Context) error

Jump to

Keyboard shortcuts

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