Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LineScanner ¶
type LineScanner struct {
// contains filtered or unexported fields
}
LineScanner is a helper for reading lines from a stream
func NewLineScanner ¶
func NewLineScanner(reader io.Reader) *LineScanner
NewLineScanner creates a new line scanner
func (*LineScanner) ReadLine ¶
func (ls *LineScanner) ReadLine() (string, error)
ReadLine reads a line from the stream
type Message ¶
type Message struct {
Type StreamType `json:"type"`
Timestamp time.Time `json:"timestamp"`
Source string `json:"source"` // hostname or container name
Data json.RawMessage `json:"data"`
}
Message represents a streamed message
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server handles real-time streaming from remote servers
func (*Server) Subscribe ¶
func (s *Server) Subscribe(types []StreamType) *Subscription
Subscribe creates a new subscription for specific stream types
func (*Server) Unsubscribe ¶
Unsubscribe removes a subscription
type StreamType ¶
type StreamType string
StreamType represents different types of streams
const ( StreamMetrics StreamType = "metrics" StreamLogs StreamType = "logs" StreamEvents StreamType = "events" StreamDocker StreamType = "docker" )
type Subscription ¶
type Subscription struct {
ID string
Types []StreamType
Messages chan Message
// contains filtered or unexported fields
}
Subscription represents a client subscription
Click to show internal directories.
Click to hide internal directories.