Skip to content

Commit

Permalink
Don't use deprecated docker type
Browse files Browse the repository at this point in the history
  • Loading branch information
ptodev committed Sep 24, 2024
1 parent a1bfb9f commit 42f81ca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion internal/component/loki/source/docker/docker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,6 @@ func (mock clientMock) ContainerInspect(ctx context.Context, c string) (types.Co
}, nil
}

func (mock clientMock) ContainerLogs(ctx context.Context, container string, options types.ContainerLogsOptions) (io.ReadCloser, error) {
func (mock clientMock) ContainerLogs(ctx context.Context, container string, options container.LogsOptions) (io.ReadCloser, error) {
return io.NopCloser(strings.NewReader(mock.logLine)), nil
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"sync"
"time"

docker_types "github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/container"
"github.com/docker/docker/client"
"github.com/docker/docker/pkg/stdcopy"
"github.com/go-kit/log"
Expand Down Expand Up @@ -94,7 +94,7 @@ func (t *Target) processLoop(ctx context.Context) {
t.wg.Add(1)
defer t.wg.Done()

opts := docker_types.ContainerLogsOptions{
opts := container.LogsOptions{
ShowStdout: true,
ShowStderr: true,
Follow: true,
Expand Down

0 comments on commit 42f81ca

Please sign in to comment.