Skip to content

Commit

Permalink
Adds comments
Browse files Browse the repository at this point in the history
  • Loading branch information
amir20 committed Nov 30, 2018
1 parent 7d80137 commit 27e8129
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docker/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@ type dockerClient struct {
cli *client.Client
}

// Client is a proxy around the docker client
type Client interface {
ListContainers() ([]Container, error)
ContainerLogs(ctx context.Context, id string) (io.ReadCloser, error)
Events(ctx context.Context) (<-chan events.Message, <-chan error)
}

// NewClient creates a new instance of Client
func NewClient() Client {
cli, err := client.NewClientWithOpts(client.FromEnv)
if err != nil {
Expand Down
1 change: 1 addition & 0 deletions docker/types.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package docker

// Container represents an internal representation of docker containers
type Container struct {
ID string `json:"id"`
Names []string `json:"names"`
Expand Down

0 comments on commit 27e8129

Please sign in to comment.