WHOOSH-REQ-001: Fix Docker Client API Compilation Error in swarm_manager.go #5

Closed
tony wants to merge 1 commits from fix/docker-client-api-compilation into main

View File

@@ -454,9 +454,11 @@ func (sm *SwarmManager) ListAgentServices() ([]swarm.Service, error) {
return agentServices, nil return agentServices, nil
} }
// @goal: WHOOSH-REQ-001 - Fix Docker Client API compilation error
// WHY: ContainerLogsOptions moved from types to container package in newer Docker client versions
// GetServiceLogs retrieves logs for a service // GetServiceLogs retrieves logs for a service
func (sm *SwarmManager) GetServiceLogs(serviceID string, lines int) (string, error) { func (sm *SwarmManager) GetServiceLogs(serviceID string, lines int) (string, error) {
options := types.ContainerLogsOptions{ options := container.LogsOptions{
ShowStdout: true, ShowStdout: true,
ShowStderr: true, ShowStderr: true,
Tail: fmt.Sprintf("%d", lines), Tail: fmt.Sprintf("%d", lines),