stream

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2023 License: Apache-2.0 Imports: 9 Imported by: ? modules, 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

This section is empty.

Functions

This section is empty.

Types

type GripStream

type GripStream interface {
	// PublishHttpStream publishes an HTTP stream format message to all of the configured PubControlClients
	// with a specified channel, message, and optional ID, previous ID, and callback.
	// Note that the 'http_stream' parameter can be provided as either an HttpStreamFormat
	// instance or a string / byte array (in which case an HttpStreamFormat instance will
	// automatically be created and have the 'content' field set to the specified value).
	PublishHttpStream(channel string, content interface{}, id string, prevID string) error

	Publish(channel string, item *pubcontrol.Item) error
}

GripStream is the interface for publishing events to a grip channel

type StreamWorker

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

StreamWorker is the type that subscribes to the SSEEvent Stream that the EventListener forwards SSEEvents from the embedded SDKs to and forwards them on to clients

func NewStreamWorker

func NewStreamWorker(l log.Logger, gpc GripStream, reg *prometheus.Registry) StreamWorker

NewStreamWorker creates a StreamWorker

func (StreamWorker) Pub

func (s StreamWorker) Pub(ctx context.Context, event stream.Event) (err error)

Pub makes StreamWorker implement the golang sdks stream.EventStreamListener interface.

Jump to

Keyboard shortcuts

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