mirror of
https://github.com/bcicen/ctop.git
synced 2025-12-06 15:16:41 +08:00
add NewDockerLogs constructor method
This commit is contained in:
@@ -17,6 +17,14 @@ type DockerLogs struct {
|
||||
done chan bool
|
||||
}
|
||||
|
||||
func NewDockerLogs(id string, client *api.Client) *DockerLogs {
|
||||
return &DockerLogs{
|
||||
id: id,
|
||||
client: client,
|
||||
done: make(chan bool),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *DockerLogs) Stream() chan models.Log {
|
||||
r, w := io.Pipe()
|
||||
logCh := make(chan models.Log)
|
||||
|
||||
Reference in New Issue
Block a user