eventstream

package
v0.0.0-...-14e3c9d Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EventTypeMessage     EventType = "message"
	EventTypeAction      EventType = "action"
	EventTypeObservation EventType = "observation"
	EventTypePlan        EventType = "plan"
	EventTypeKnowledge   EventType = "knowledge"
	EventTypeDatasource  EventType = "datasource"
	EventTypeStateUpdate EventType = "state_update" // For RocketMQ
	EventTypeCacheUpdate EventType = "cache_update" // For DragonflyDB invalidation

	EventSourceUser    EventSource = "user"
	EventSourceAgent   EventSource = "agent"
	EventSourceSystem  EventSource = "system"
	EventSourceModule  EventSource = "module"
	EventSourceCICD    EventSource = "ci_cd"
	EventSourceK8s     EventSource = "kubernetes"
	EventSourceSandbox EventSource = "sandbox"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	ID        string            `json:"id"`
	Type      EventType         `json:"type"`
	Source    EventSource       `json:"source"`
	Timestamp time.Time         `json:"timestamp"`
	Data      interface{}       `json:"data"`               // Flexible data payload
	Metadata  map[string]string `json:"metadata,omitempty"` // Optional metadata
}

func NewEvent

func NewEvent(eventType EventType, source EventSource, data interface{}, metadata map[string]string) *Event

type EventSource

type EventSource string

type EventType

type EventType string

Jump to

Keyboard shortcuts

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