container

package
v0.0.0-...-fba35eb Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContainerResponse

type ContainerResponse struct {
	Snapshots []types.DockerContainerBasicInfo `json:"snapshots"`
	Inspect   []types.DockerContainerInspect   `json:"inspect"`
}

type ContainerService

type ContainerService interface {
	// ListContainers returns a list of all containers with their details
	GetAllContainers(ctx context.Context) ([]types.DockerContainerBasicInfo, error)
	GetContainerStatsById(ctx context.Context, id string)
}

ContainerService defines the interface for container operations

type ContainerServiceImpl

type ContainerServiceImpl struct {
	DockerManager *docker.DockerManager
	RedisClient   *redis.Client
}

func NewContainerServiceImpl

func NewContainerServiceImpl(dockerManager *docker.DockerManager, redisClient *redis.Client) *ContainerServiceImpl

func (*ContainerServiceImpl) GetAllContainers

func (csrv *ContainerServiceImpl) GetAllContainers(ctx context.Context) ([]types.DockerContainerBasicInfo, error)

func (*ContainerServiceImpl) GetContainerInspectById

func (csrv *ContainerServiceImpl) GetContainerInspectById(ctx context.Context, id string) types.DockerContainerInspect

Jump to

Keyboard shortcuts

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