sse

package
v0.0.1-alpha.4 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

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