sse

package
v0.0.2-alpha.4 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2026 License: Apache-2.0 Imports: 7 Imported by: 1 module, 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

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Event

type Event struct {
	Type enum.SSEType    `json:"type"`
	Data json.RawMessage `json:"data"`
}

type Streamer

type Streamer interface {
	// Publish publishes a new event for the given project.
	Publish(ctx context.Context, projectID int64, eventType enum.SSEType, data any) error

	Stream(ctx context.Context, projectID int64) (<-chan *Event, <-chan error, func(context.Context) error)
}

func NewStreamer

func NewStreamer(pubsub pubsub.PubSub) Streamer

func ProvideEventStreamer

func ProvideEventStreamer(pubsub pubsub.PubSub) Streamer

Jump to

Keyboard shortcuts

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