Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type BaseMessage ¶
type BaseMessage struct {
Type MessageType `json:"type"`
Timestamp string `json:"timestamp"`
}
type ContainerStatusEvent ¶
type ContainerStatusEvent struct {
BaseMessage
StackName string `json:"stack_name"`
ServiceName string `json:"service_name"`
ContainerName string `json:"container_name"`
ContainerID string `json:"container_id"`
Status string `json:"status"`
Health string `json:"health,omitempty"`
Image string `json:"image"`
Ports []Port `json:"ports,omitempty"`
}
type ErrorEvent ¶
type ErrorEvent struct {
BaseMessage
Error string `json:"error"`
Context string `json:"context,omitempty"`
}
type Hub ¶
type Hub struct {
// contains filtered or unexported fields
}
func (*Hub) BroadcastContainerStatus ¶
func (h *Hub) BroadcastContainerStatus(event ContainerStatusEvent)
func (*Hub) BroadcastOperationProgress ¶
func (h *Hub) BroadcastOperationProgress(event OperationProgressEvent)
func (*Hub) BroadcastStackStatus ¶
func (h *Hub) BroadcastStackStatus(event StackStatusEvent)
type MessageType ¶
type MessageType string
const ( MessageTypeContainerStatus MessageType = "container_status" MessageTypeStackStatus MessageType = "stack_status" MessageTypeOperationProgress MessageType = "operation_progress" MessageTypeError MessageType = "error" MessageTypeTerminalOutput MessageType = "terminal_output" MessageTypeTerminalResize MessageType = "terminal_resize" MessageTypeTerminalInput MessageType = "terminal_input" MessageTypeTerminalClose MessageType = "terminal_close" )
type OperationProgressEvent ¶
type StackStatusEvent ¶
type TerminalCloseEvent ¶
type TerminalCloseEvent struct {
BaseMessage
SessionID string `json:"session_id"`
ExitCode int `json:"exit_code"`
}
type TerminalInputEvent ¶
type TerminalInputEvent struct {
BaseMessage
SessionID string `json:"session_id"`
Input []byte `json:"input"`
}
type TerminalOutputEvent ¶
type TerminalOutputEvent struct {
BaseMessage
SessionID string `json:"session_id"`
Output []byte `json:"output"`
}
type TerminalResizeEvent ¶
type TerminalResizeEvent struct {
BaseMessage
SessionID string `json:"session_id"`
Cols int `json:"cols"`
Rows int `json:"rows"`
}
Click to show internal directories.
Click to hide internal directories.