Documentation ¶
Overview ¶
Package manager creates and manages multiple streams, providing an API for performing CRUD operations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrStreamExists = errors.New("stream already exists") ErrStreamDoesNotExist = errors.New("stream does not exist") )
Errors specifically returned by a stream manager.
Functions ¶
func OptSetLogger ¶
OptSetLogger sets the logging output to be used by the manager and all child streams.
func OptSetManager ¶
OptSetManager sets the service manager to be used by the stream manager and all child streams.
func OptSetStats ¶
OptSetStats sets the metrics aggregator to be used by the manager and all child streams.
Types ¶
type StreamStatus ¶
StreamStatus contains fields used to describe the current status of a managed stream.
type Type ¶
type Type struct {
// contains filtered or unexported fields
}
Type manages a collection of streams, providing APIs for CRUD operations on the streams.
func (*Type) Create ¶
Create attempts to construct and run a new stream under a unique ID. If the ID already exists an error is returned.
func (*Type) Delete ¶
Delete attempts to stop and remove a stream by its ID. Returns an error if the stream was not found, or if clean shutdown fails in the specified period of time.