streaming

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StreamConsumer

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

StreamConsumer listens to Redis streams and forwards events to the learning Engine

func NewStreamConsumer

func NewStreamConsumer(redisAddr string, server *mcp.Server, engine *learning.Engine) (*StreamConsumer, error)

NewStreamConsumer creates a new stream consumer that delegates to learning Engine

func (*StreamConsumer) PublishEvent

func (sc *StreamConsumer) PublishEvent(ctx context.Context, eventType string, data map[string]interface{}) error

PublishEvent publishes a tool event to the stream (for other components to use)

func (*StreamConsumer) Start

func (sc *StreamConsumer) Start(ctx context.Context) error

Start begins consuming the stream

func (*StreamConsumer) Stop

func (sc *StreamConsumer) Stop()

Stop gracefully stops the consumer

Jump to

Keyboard shortcuts

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