docker

package
v0.0.0-...-2578c2a Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DockerLogs

func DockerLogs(
	ctx context.Context,
	cli Streamer,
	containerName string,
	lastMessage string,
) (logs.RAW, error)

func GetDockers

func GetDockers(
	ctx context.Context,
	c Lister,
	filts ...func(container2 types.Container) bool,
) ([]string, error)

func New

func New() (*client.Client, error)

func StreamDockerLogs

func StreamDockerLogs(
	ctx context.Context,
	cli Streamer,
	containerName string,
	logsChan chan string,
) error

Types

type Lister

type Lister interface {
	//	ContainerRestart(ctx context.Context, containerID string, options container.StopOptions) error
	ContainerList(
		ctx context.Context,
		options types.ContainerListOptions,
	) ([]types.Container, error)
}

type Streamer

type Streamer interface {
	ContainerLogs(
		ctx context.Context,
		container string,
		options types.ContainerLogsOptions,
	) (io.ReadCloser, error)
}

Jump to

Keyboard shortcuts

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