mirror of
https://github.com/amir20/dozzle.git
synced 2025-12-27 07:31:46 +01:00
Adds comments
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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"`
|
||||
|
||||
Reference in New Issue
Block a user