// Path: src/main/java/me/itzg/mccy/services/DockerClientConsumer.java
// public interface DockerClientConsumer<T> {
//     T use(DockerClient dockerClient) throws DockerException, InterruptedException;
// }


import com.google.common.base.Optional;
import com.spotify.docker.client.DefaultDockerClient;
import com.spotify.docker.client.DockerCertificates;
import com.spotify.docker.client.DockerClient;
import com.spotify.docker.client.exceptions.DockerCertificateException;
import com.spotify.docker.client.exceptions.DockerException;
import me.itzg.mccy.config.MccySettings;
import me.itzg.mccy.services.DockerClientConsumer;
import me.itzg.mccy.services.DockerClientProxy;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;
import java.nio.file.Paths;
package me.itzg.mccy.services.impl;



/**
 * @author Geoff Bourne
 * @since 0.1
 */
@Service @Primary
public class DockerClientProxyImpl implements DockerClientProxy {
    private MccySettings mccySettings;
    private DockerClient dockerClient;

    @Override
// Path: src/main/java/me/itzg/mccy/services/DockerClientConsumer.java
// public interface DockerClientConsumer<T> {
//     T use(DockerClient dockerClient) throws DockerException, InterruptedException;
// }


// Path: src/main/java/me/itzg/mccy/services/impl/DockerClientProxyImpl.java
import com.google.common.base.Optional;
import com.spotify.docker.client.DefaultDockerClient;
import com.spotify.docker.client.DockerCertificates;
import com.spotify.docker.client.DockerClient;
import com.spotify.docker.client.exceptions.DockerCertificateException;
import com.spotify.docker.client.exceptions.DockerException;
import me.itzg.mccy.config.MccySettings;
import me.itzg.mccy.services.DockerClientConsumer;
import me.itzg.mccy.services.DockerClientProxy;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;
import java.nio.file.Paths;

package me.itzg.mccy.services.impl;



/**
 * @author Geoff Bourne
 * @since 0.1
 */
@Service @Primary
public class DockerClientProxyImpl implements DockerClientProxy {
    private MccySettings mccySettings;
    private DockerClient dockerClient;

    @Override
    public <T> T access(DockerClientConsumer<T> consumer) throws DockerException, InterruptedException {