88
99 "github.com/docker/docker/api/types/container"
1010 "github.com/sasha-s/go-deadlock"
11-
12- dockerTypes "github.com/docker/docker/api/types"
1311 "github.com/docker/docker/api/types/filters"
1412 "github.com/docker/docker/client"
1513 "github.com/go-errors/errors"
@@ -29,12 +27,12 @@ type Container struct {
2927 OneOff bool
3028 ProjectName string
3129 ID string
32- Container dockerTypes. Container
30+ Container container. Summary
3331 Client * client.Client
3432 OSCommand * OSCommand
3533 Log * logrus.Entry
3634 StatHistory []* RecordedStats
37- Details dockerTypes. ContainerJSON
35+ Details container. InspectResponse
3836 MonitoringStats bool
3937 DockerCommand LimitedDockerCommand
4038 Tr * i18n.TranslationSet
@@ -105,15 +103,15 @@ func (c *Container) Attach() (*exec.Cmd, error) {
105103}
106104
107105// Top returns process information
108- func (c * Container ) Top (ctx context.Context ) (container.ContainerTopOKBody , error ) {
106+ func (c * Container ) Top (ctx context.Context ) (container.TopResponse , error ) {
109107 detail , err := c .Inspect ()
110108 if err != nil {
111- return container.ContainerTopOKBody {}, err
109+ return container.TopResponse {}, err
112110 }
113111
114112 // check container status
115113 if ! detail .State .Running {
116- return container.ContainerTopOKBody {}, errors .New ("container is not running" )
114+ return container.TopResponse {}, errors .New ("container is not running" )
117115 }
118116
119117 return c .Client .ContainerTop (ctx , c .ID , []string {})
@@ -126,7 +124,7 @@ func (c *DockerCommand) PruneContainers() error {
126124}
127125
128126// Inspect returns details about the container
129- func (c * Container ) Inspect () (dockerTypes. ContainerJSON , error ) {
127+ func (c * Container ) Inspect () (container. InspectResponse , error ) {
130128 return c .Client .ContainerInspect (context .Background (), c .ID )
131129}
132130
0 commit comments