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

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

There is a newer version: 3.30.0
Show newest version
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 {

    private 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;
        } else {
            return true;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy