wsfeed

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackgroundService

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

func NewBackgroundService

func NewBackgroundService() *BackgroundService

func (*BackgroundService) IsRunning

func (s *BackgroundService) IsRunning() bool

func (*BackgroundService) Start

func (s *BackgroundService) Start()

func (*BackgroundService) Status

func (s *BackgroundService) Status() string

func (*BackgroundService) Stop

func (s *BackgroundService) Stop()

type FeedEvent

type FeedEvent struct {
	Type      string      `json:"type"`
	Timestamp time.Time   `json:"timestamp"`
	Data      interface{} `json:"data"`
}

type WebSocketFeed

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

func NewWebSocketFeed

func NewWebSocketFeed() *WebSocketFeed

func (*WebSocketFeed) Broadcast

func (f *WebSocketFeed) Broadcast(event FeedEvent)

func (*WebSocketFeed) BroadcastCostAlert

func (f *WebSocketFeed) BroadcastCostAlert(message string, usd float64)

func (*WebSocketFeed) BroadcastRequest

func (f *WebSocketFeed) BroadcastRequest(source, model string, inputTokens, outputTokens int)

func (*WebSocketFeed) ExportJSON

func (f *WebSocketFeed) ExportJSON() ([]byte, error)

func (*WebSocketFeed) Subscribe

func (f *WebSocketFeed) Subscribe(id string) <-chan FeedEvent

func (*WebSocketFeed) SubscriberCount

func (f *WebSocketFeed) SubscriberCount() int

func (*WebSocketFeed) Unsubscribe

func (f *WebSocketFeed) Unsubscribe(id string)

Jump to

Keyboard shortcuts

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