docker

package
v0.0.0-...-1edb944 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client represents a Docker client with additional functionality for dev-stack

func NewClient

func NewClient(logger *slog.Logger) (*Client, error)

NewClient creates a new Docker client instance

func (*Client) Close

func (c *Client) Close() error

Close closes the Docker client connection

func (*Client) Containers

func (c *Client) Containers() *ContainerService

Containers returns a service for container operations

func (*Client) Images

func (c *Client) Images() *ImageService

Images returns a service for image operations

func (*Client) Networks

func (c *Client) Networks() *NetworkService

Networks returns a service for network operations

func (*Client) Volumes

func (c *Client) Volumes() *VolumeService

Volumes returns a service for volume operations

type ContainerExecutor

type ContainerExecutor struct {
	// contains filtered or unexported fields
}

ContainerExecutor handles container execution and logs operations

func NewContainerExecutor

func NewContainerExecutor(client *Client) *ContainerExecutor

NewContainerExecutor creates a new container executor

func (*ContainerExecutor) Exec

func (ce *ContainerExecutor) Exec(ctx context.Context, projectName, serviceName string, cmd []string, options types.ExecOptions) error

Exec executes a command in a running container

func (*ContainerExecutor) Logs

func (ce *ContainerExecutor) Logs(ctx context.Context, projectName string, serviceNames []string, options types.LogOptions) error

Logs retrieves logs from containers

type ContainerLifecycle

type ContainerLifecycle struct {
	// contains filtered or unexported fields
}

ContainerLifecycle handles container start/stop operations

func NewContainerLifecycle

func NewContainerLifecycle(client *Client) *ContainerLifecycle

NewContainerLifecycle creates a new container lifecycle manager

func (*ContainerLifecycle) Start

func (cl *ContainerLifecycle) Start(ctx context.Context, projectName string, serviceNames []string, options types.StartOptions) error

Start starts containers for the specified services

func (*ContainerLifecycle) Stop

func (cl *ContainerLifecycle) Stop(ctx context.Context, projectName string, serviceNames []string, options types.StopOptions) error

Stop stops containers for the specified services

type ContainerLister

type ContainerLister struct {
	// contains filtered or unexported fields
}

ContainerLister handles container discovery and status operations

func NewContainerLister

func NewContainerLister(client *Client) *ContainerLister

NewContainerLister creates a new container lister

func (*ContainerLister) List

func (cl *ContainerLister) List(ctx context.Context, projectName string, serviceNames []string) ([]types.ServiceStatus, error)

List returns a list of containers matching the given filters

type ContainerService

type ContainerService struct {
	// contains filtered or unexported fields
}

ContainerService provides container management operations

func NewContainerService

func NewContainerService(client *Client) *ContainerService

NewContainerService creates a new container service

func (*ContainerService) Exec

func (cs *ContainerService) Exec(ctx context.Context, projectName, serviceName string, cmd []string, options types.ExecOptions) error

Exec executes a command in a running container

func (*ContainerService) List

func (cs *ContainerService) List(ctx context.Context, projectName string, serviceNames []string) ([]types.ServiceStatus, error)

List returns a list of containers matching the given filters

func (*ContainerService) Logs

func (cs *ContainerService) Logs(ctx context.Context, projectName string, serviceNames []string, options types.LogOptions) error

Logs retrieves logs from containers

func (*ContainerService) Start

func (cs *ContainerService) Start(ctx context.Context, projectName string, serviceNames []string, options types.StartOptions) error

Start starts containers for the specified services

func (*ContainerService) Stop

func (cs *ContainerService) Stop(ctx context.Context, projectName string, serviceNames []string, options types.StopOptions) error

Stop stops containers for the specified services

type ContainerStats

type ContainerStats struct {
	CPUUsage float64
	Memory   types.MemoryUsage
}

ContainerStats holds container statistics

type ImageService

type ImageService struct {
	// contains filtered or unexported fields
}

ImageService provides image management operations

func (*ImageService) List

func (is *ImageService) List(ctx context.Context, projectName string) ([]string, error)

List returns a list of images for the project

func (*ImageService) Remove

func (is *ImageService) Remove(ctx context.Context, projectName string) error

Remove removes images for the project

type NetworkService

type NetworkService struct {
	// contains filtered or unexported fields
}

NetworkService provides network management operations

func (*NetworkService) List

func (ns *NetworkService) List(ctx context.Context, projectName string) ([]string, error)

List returns a list of networks for the project

func (*NetworkService) Remove

func (ns *NetworkService) Remove(ctx context.Context, projectName string) error

Remove removes networks for the project

type VolumeService

type VolumeService struct {
	// contains filtered or unexported fields
}

VolumeService provides volume management operations

func (*VolumeService) List

func (vs *VolumeService) List(ctx context.Context, projectName string) ([]string, error)

List returns a list of volumes for the project

func (*VolumeService) Remove

func (vs *VolumeService) Remove(ctx context.Context, projectName string) error

Remove removes volumes for the project

Jump to

Keyboard shortcuts

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