All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.codacy.scoobydoo.kubernetes.KubernetesWrapperSpy Maven / Gradle / Ivy

package com.codacy.scoobydoo.kubernetes;

import io.fabric8.kubernetes.api.model.Pod;
import io.fabric8.kubernetes.client.KubernetesClient;
import io.fabric8.kubernetes.client.LocalPortForward;

import java.util.Map;

public class KubernetesWrapperSpy extends KubernetesWrapper {
    public boolean firstRun;

    public KubernetesWrapperSpy(KubernetesClient kubernetesClient) {
        super(kubernetesClient);
        this.firstRun = true;
    }

    public Map> getOpenPortForwards() {
        return super.openPortForwards;
    }

    protected boolean testPortForwardCallback(LocalPortForward portForward) {
        if (this.firstRun) {
            this.firstRun = false;
            return false;
        }

        return true;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy