docklogs

package
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 12, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DockerCli

type DockerCli interface {
	docker.APIClient
	IsContainerLive(string) bool
}

DockerCli extends the docker.APIClient with IsContainerLive function in order to reduce the time to check if a container is live.

type DockerClient

type DockerClient struct {
	*docker.Client
	LiveContainers []types.Container // Used to check if the given containers are live
}

DockerClient extends the docker.Client with LiveContainers field, in order to reduce the time to check if a container is live.

func GetDockerClient

func GetDockerClient(ctx context.Context) (*DockerClient, error)

GetDockerClient returns a pointer to new DockerClient, it fetches all the live containers on the creation of the client in order to reduce the time to check if a container is live.

func (*DockerClient) IsContainerLive

func (dc *DockerClient) IsContainerLive(name string) bool

IsContainerLive checks if the container with given name is alive or dead

type LogOp

type LogOp struct {
	Follow     bool
	Containers []string
}

func (*LogOp) Run

func (l *LogOp) Run(ctx context.Context) error

Run is the entrypoint for fetching the logs

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL