Documentation
¶
Index ¶
- type ContainerResult
- type Service
- func (s *Service) Close() error
- func (s *Service) GetDockerInfo(ctx context.Context) (map[string]interface{}, error)
- func (s *Service) ListRunningContainers(ctx context.Context) (int, error)
- func (s *Service) Ping(ctx context.Context) error
- func (s *Service) PullImage(ctx context.Context, imageName string) error
- func (s *Service) RunContainer(ctx context.Context, imageName string, command []string) (*ContainerResult, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContainerResult ¶
type ContainerResult struct {
Output string
ExitCode int
Duration int // in seconds
StartedAt time.Time
Error error
}
ContainerResult holds the output and metadata from container execution
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service handles Docker container operations
func NewDockerService ¶
NewDockerService creates a new Docker service instance
func (*Service) GetDockerInfo ¶
GetDockerInfo returns Docker system information
func (*Service) ListRunningContainers ¶
ListRunningContainers returns the count of currently running containers
func (*Service) RunContainer ¶
func (s *Service) RunContainer(ctx context.Context, imageName string, command []string) (*ContainerResult, error)
RunContainer runs a Docker container and captures its output This is the main function that executes user code
Click to show internal directories.
Click to hide internal directories.