Documentation
¶
Overview ¶
Package ws implements the WebSocket endpoint that streams real-time data (container stats and logs) to authenticated frontend clients.
A single connection is multiplexed: the client sends "subscribe" messages naming a channel + target, and the server pushes tagged frames back. This lets one dashboard watch many containers over one socket.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Hub ¶
type Hub struct {
// contains filtered or unexported fields
}
Hub serves WebSocket connections backed by a Streamer.
type Streamer ¶
type Streamer interface {
StreamStats(ctx context.Context, hostID int64, id string, emit func(docker.StatsSample)) error
StreamLogs(ctx context.Context, hostID int64, id string, follow bool, tail string, emit func(docker.LogLine)) error
}
Streamer is the subset of the docker manager the hub needs.
Click to show internal directories.
Click to hide internal directories.