mirror of
https://github.com/amir20/dozzle.git
synced 2025-12-27 15:41:45 +01:00
feat!: implements swarm mode with agents (#3058)
This commit is contained in:
30
internal/support/docker/container_service.go
Normal file
30
internal/support/docker/container_service.go
Normal file
@@ -0,0 +1,30 @@
|
||||
package docker_support
|
||||
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
"time"
|
||||
|
||||
"github.com/amir20/dozzle/internal/docker"
|
||||
)
|
||||
|
||||
type containerService struct {
|
||||
clientService ClientService
|
||||
Container docker.Container
|
||||
}
|
||||
|
||||
func (c *containerService) RawLogs(ctx context.Context, from time.Time, to time.Time, stdTypes docker.StdType) (io.ReadCloser, error) {
|
||||
return c.clientService.RawLogs(ctx, c.Container, from, to, stdTypes)
|
||||
}
|
||||
|
||||
func (c *containerService) LogsBetweenDates(ctx context.Context, from time.Time, to time.Time, stdTypes docker.StdType) (<-chan *docker.LogEvent, error) {
|
||||
return c.clientService.LogsBetweenDates(ctx, c.Container, from, to, stdTypes)
|
||||
}
|
||||
|
||||
func (c *containerService) StreamLogs(ctx context.Context, from time.Time, stdTypes docker.StdType, events chan<- *docker.LogEvent) error {
|
||||
return c.clientService.StreamLogs(ctx, c.Container, from, stdTypes, events)
|
||||
}
|
||||
|
||||
func (c *containerService) Action(action docker.ContainerAction) error {
|
||||
return c.clientService.ContainerAction(c.Container, action)
|
||||
}
|
||||
Reference in New Issue
Block a user