...

Package kubeportforward

Overview ▾

type PFClient

type PFClient struct {
    // contains filtered or unexported fields
}

func NewPFClient

func NewPFClient(kubernetesClient kclient.ClientInterface, stateClient state.Client) *PFClient

func (*PFClient) GetForwardedPorts

func (o *PFClient) GetForwardedPorts() map[string][]v1alpha2.Endpoint

func (*PFClient) StartPortForwarding

func (o *PFClient) StartPortForwarding(ctx context.Context, devFileObj parser.DevfileObj, componentName string, debug bool, randomPorts bool, out io.Writer, errOut io.Writer, definedPorts []api.ForwardedPort, customAddress string) error

func (*PFClient) StopPortForwarding

func (o *PFClient) StopPortForwarding(ctx context.Context, componentName string)

type PortWriter

type PortWriter struct {
    // contains filtered or unexported fields
}

func NewPortWriter

func NewPortWriter(buffer io.Writer, len int, mapping map[string][]v1alpha2.Endpoint, customAddress string) *PortWriter

NewPortWriter creates a writer that will write the content in buffer, and Wait will return after strings "Forwarding from 127.0.0.1:" has been written "len" times

func (*PortWriter) GetForwardedPorts

func (o *PortWriter) GetForwardedPorts() []api.ForwardedPort

func (*PortWriter) Wait

func (o *PortWriter) Wait()

func (*PortWriter) Write

func (o *PortWriter) Write(buf []byte) (n int, err error)