eventdistributer

package
v1.0.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CanvasUpdatedEvent        = "canvas_updated"
	CanvasStagingUpdatedEvent = "staging_updated"
	CanvasDeletedEvent        = "canvas_deleted"
	CanvasMemoryUpdatedEvent  = "memory_updated"
)
View Source
const (
	ExecutionCreatedEvent    = "execution_created"
	ExecutionFinishedEvent   = "execution_finished"
	ExecutionStartedEvent    = "execution_started"
	ExecutionCancellingEvent = "execution_cancelling"
)
View Source
const (
	FactoryTopicPrefix    = "factory:"
	WorkOrderUpdatedEvent = "work_order_updated"
)
View Source
const (
	QueueItemCreatedEvent  = "queue_item_created"
	QueueItemConsumedEvent = "queue_item_consumed"
)
View Source
const (
	RunPendingEvent    = "run_pending"
	RunStartedEvent    = "run_started"
	RunCancellingEvent = "run_cancelling"
	RunFinishedEvent   = "run_finished"
)
View Source
const (
	UserTopicPrefix       = "user:"
	UserNotificationEvent = "user_notification"
)
View Source
const PublicBoardChangedEvent = "board_changed"

Variables

This section is empty.

Functions

func AgentSessionWebsocketTopic added in v0.21.0

func AgentSessionWebsocketTopic(sessionID string) string

AgentSessionWebsocketTopic is the hub key shared by publisher and subscriber. Access control is enforced at subscribe time — we trust the topic on broadcast.

func BroadcastFactoryWorkOrderUpdated

func BroadcastFactoryWorkOrderUpdated(wsHub *ws.Hub, msg *pb.FactoryWorkOrderUpdatedMessage) error

func FactoryWebsocketTopic

func FactoryWebsocketTopic(factoryID string) string

FactoryWebsocketTopic is the hub key shared by publisher and subscriber.

func HandleAgentSessionEvent added in v0.21.0

func HandleAgentSessionEvent(messageBody []byte, wsHub *ws.Hub) error

func HandleCanvasDeleted added in v0.10.0

func HandleCanvasDeleted(messageBody []byte, wsHub *ws.Hub) error

func HandleCanvasEventCreated added in v0.6.0

func HandleCanvasEventCreated(messageBody []byte, wsHub *ws.Hub) error

func HandleCanvasExecution added in v0.6.0

func HandleCanvasExecution(messageBody []byte, wsHub *ws.Hub) error

func HandleCanvasMemoryUpdated added in v0.26.0

func HandleCanvasMemoryUpdated(messageBody []byte, wsHub *ws.Hub) error

func HandleCanvasRun added in v0.21.0

func HandleCanvasRun(messageBody []byte, wsHub *ws.Hub) error

func HandleCanvasStagingUpdated added in v0.26.0

func HandleCanvasStagingUpdated(messageBody []byte, wsHub *ws.Hub) error

func HandleCanvasUpdated added in v0.10.0

func HandleCanvasUpdated(messageBody []byte, wsHub *ws.Hub) error

func HandleFactoryWorkOrderUpdated

func HandleFactoryWorkOrderUpdated(messageBody []byte, wsHub *ws.Hub) error

func HandlePendingCanvasRun

func HandlePendingCanvasRun(messageBody []byte, wsHub *ws.Hub) error

func HandleQueueItemConsumed added in v0.6.0

func HandleQueueItemConsumed(messageBody []byte, wsHub *ws.Hub) error

func HandleQueueItemCreated added in v0.6.0

func HandleQueueItemCreated(messageBody []byte, wsHub *ws.Hub) error

func HandleUserNotification

func HandleUserNotification(messageBody []byte, wsHub *ws.Hub) error

func NotifyPublicBoard

func NotifyPublicBoard(factoryID string)

NotifyPublicBoard tells public line sockets to refetch. It sends no card data.

func PublicBoardChangedMessage

func PublicBoardChangedMessage() []byte

PublicBoardChangedMessage is the only payload a public line socket sends.

func PublicLineTopic

func PublicLineTopic(lineID string) string

PublicLineTopic is the hub key for guests watching one public line. It is not the member factory topic.

func SetPublicBoardBroadcaster

func SetPublicBoardBroadcaster(hub *ws.Hub, broadcast func(hub *ws.Hub, factoryID string))

SetPublicBoardBroadcaster registers the guest-board fan-out. The member socket still receives factory id, order id, and reason.

func UserNotificationWebsocketTopic

func UserNotificationWebsocketTopic(userID string) string

Types

type CanvasEventWebsocketEvent added in v0.6.0

type CanvasEventWebsocketEvent struct {
	Event   string          `json:"event"`
	Payload json.RawMessage `json:"payload"`
}

type CanvasStatePayload added in v0.10.0

type CanvasStatePayload struct {
	ID        string `json:"id"`
	CanvasID  string `json:"canvasId,omitempty"`
	VersionID string `json:"versionId,omitempty"`
	UserID    string `json:"userId,omitempty"`
}

type CanvasStateWebsocketEvent added in v0.10.0

type CanvasStateWebsocketEvent struct {
	Event   string             `json:"event"`
	Payload CanvasStatePayload `json:"payload"`
}

type ExecutionStateWebsocketEvent

type ExecutionStateWebsocketEvent struct {
	Event   string          `json:"event"`
	Payload json.RawMessage `json:"payload"`
}

type QueueItemWebsocketEvent

type QueueItemWebsocketEvent struct {
	Event   string          `json:"event"`
	Payload json.RawMessage `json:"payload"`
}

type RunStateWebsocketEvent added in v0.21.0

type RunStateWebsocketEvent struct {
	Event   string          `json:"event"`
	Payload json.RawMessage `json:"payload"`
}

Jump to

Keyboard shortcuts

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