Files
Amir Raminfar 13da2a4222
Push container / Push branches and PRs (push) Waiting to run
Deploy VitePress site to Pages / build (push) Waiting to run
Deploy VitePress site to Pages / Deploy (push) Blocked by required conditions
Test / Typecheck (push) Waiting to run
Test / JavaScript Tests (push) Waiting to run
Test / Go Tests (push) Waiting to run
Test / Go Staticcheck (push) Waiting to run
Test / Integration Tests (push) Waiting to run
feat: supports k8s cluster (#3599)
2025-02-10 09:29:39 -08:00

28 lines
434 B
Go

package k8s
import (
"bufio"
"io"
"github.com/amir20/dozzle/internal/container"
)
type LogReader struct {
reader *bufio.Reader
}
func NewLogReader(reader io.ReadCloser) *LogReader {
return &LogReader{
reader: bufio.NewReader(reader),
}
}
func (r *LogReader) Read() (string, container.StdType, error) {
line, err := r.reader.ReadString('\n')
if err != nil {
return "", 0, err
}
return line, container.STDOUT, nil
}