Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleSSEConnections ¶
Function to handle SSE connections
func SendMessageToClient ¶
func SendMessageToClient(message SSEMessage)
Function to send a message to all clients
Types ¶
type MessageEvent ¶
type MessageEvent string
const ( MessageEventDeleted MessageEvent = "Deleted" MessageEventModified MessageEvent = "Modified" MessageEventAdded MessageEvent = "Added" )
type MessageType ¶
type MessageType string
const ( MessageTypeSuccess MessageType = "success" MessageTypeError MessageType = "error" )
type SSEMessage ¶
type SSEMessage struct { Type MessageType `json:"type"` Data string `json:"data"` Event MessageEvent `json:"event"` Target string `json:"target"` CRDType string `json:"crdType"` }
Click to show internal directories.
Click to hide internal directories.