Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StartsLogsStreaming ¶
func StartsLogsStreaming(ctx context.Context, clientset *kubernetes.Clientset, namespace, name string, out chan<- []byte) error
StartsLogsStreaming reads the data from request and writes into the out channel. It buffers data from requests until the newline or io.EOF occurs in the data, so it doesn't interleave logs sub-line when running concurrently.
A successful read returns err == nil, not err == io.EOF. Because the function is defined to read from request until io.EOF, it does not treat an io.EOF as an error to be reported.
Types ¶
type JSONParser ¶
type JSONParser struct{}
JSONParser knows how to parse JSON formatted logs.
func (*JSONParser) ParseLineIntoCharm ¶
func (j *JSONParser) ParseLineIntoCharm(line string) ([]any, charmlog.Level)
ParseLineIntoCharm returns parsed log line with charm logger support.
Click to show internal directories.
Click to hide internal directories.