1
0
mirror of https://github.com/amir20/dozzle.git synced 2025-12-27 07:31:46 +01:00

Adds comments

This commit is contained in:
Amir Raminfar
2018-11-30 10:10:51 -08:00
parent 7d801379db
commit 27e8129caa
2 changed files with 3 additions and 0 deletions

View File

@@ -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 {

View File

@@ -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"`