docker

package
v3.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: BSD-3-Clause Imports: 31 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CountImageUsage

func CountImageUsage(images []image.Summary, containers []container.Summary, now time.Time) types.ImageUsageCounts

func CountNetworkUsage

func CountNetworkUsage(networks []network.Summary, containers []container.Summary) (inuse, unused, total int)

func FetchDiskUsage added in v3.2.0

func FetchDiskUsage(ctx context.Context, dockerClient *client.Client, options client.DiskUsageOptions) (client.DiskUsageResult, error)

FetchDiskUsage queries Docker disk usage without computing sizes for running containers.

Types

type ClientServiceOptions added in v3.2.0

type ClientServiceOptions struct {
	EventBus            bus.Config
	LocalDockerDisabled bool
}

type DockerClientService

type DockerClientService struct {
	*client.Client

	VolumeUsage *docker.VolumeUsageCache
	// contains filtered or unexported fields
}

func NewDockerClientService

func NewDockerClientService(ctx context.Context, db *database.DB, settingsService *settings.SettingsService, opts ClientServiceOptions) *DockerClientService

func (*DockerClientService) Call

func (s *DockerClientService) Call[T any](ctx context.Context, op func(context.Context, *client.Client) (T, error)) (T, error)

func (*DockerClientService) Close

func (s *DockerClientService) Close()

func (*DockerClientService) DockerHost

func (s *DockerClientService) DockerHost() (string, error)

DockerHost fails with common.ErrLocalDockerDisabled so no caller reaches the local socket while it is turned off.

func (*DockerClientService) Engine

func (*DockerClientService) EventBus

func (s *DockerClientService) EventBus() *bus.DockerEventBus

func (*DockerClientService) EventStreamConnected

func (s *DockerClientService) EventStreamConnected() *concurrency.Signal[struct{}]

func (*DockerClientService) GetAllContainers

func (s *DockerClientService) GetAllContainers(ctx context.Context) ([]container.Summary, int, int, int, error)

func (*DockerClientService) GetAllImages

func (*DockerClientService) GetAllNetworks

func (s *DockerClientService) GetAllNetworks(ctx context.Context) ([]network.Summary, int, int, int, error)

func (*DockerClientService) GetClient

func (s *DockerClientService) GetClient(ctx context.Context) (*client.Client, error)

func (*DockerClientService) GetDiskUsage

func (*DockerClientService) GetSnapshot

func (*DockerClientService) ListCoalesced

func (s *DockerClientService) ListCoalesced[T any](ctx context.Context, group *singleflight.Group, key string, op func(context.Context, *client.Client) (T, error)) (T, error)

func (*DockerClientService) ListContainers

func (s *DockerClientService) ListContainers(ctx context.Context, live bool) ([]container.Summary, error)

func (*DockerClientService) ListImages

func (s *DockerClientService) ListImages(ctx context.Context) ([]image.Summary, error)

func (*DockerClientService) LocalDockerEnabled added in v3.2.0

func (s *DockerClientService) LocalDockerEnabled() bool

func (*DockerClientService) RefreshClient

func (s *DockerClientService) RefreshClient(ctx context.Context) error

RefreshClient probes the Docker daemon and recreates the cached client when the daemon's effective API version changed.

func (*DockerClientService) WatchEvents

func (s *DockerClientService) WatchEvents(ctx context.Context)

func (*DockerClientService) WithClient

func (s *DockerClientService) WithClient(dockerClient *client.Client) *DockerClientService

Jump to

Keyboard shortcuts

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