runner

package
v0.1.1-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 14, 2021 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadKubeClient

func LoadKubeClient()

func Match

func Match(name string, pod string) bool

Types

type Executable

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

func (*Executable) ID

func (e *Executable) ID() string

func (*Executable) Start

func (e *Executable) Start(ctx context.Context, rec chan output.Message) error

func (*Executable) Stop

func (e *Executable) Stop(ctx context.Context, rec chan output.Message) error

type PaddedID

type PaddedID struct {
	Length int
}

func (*PaddedID) ID

func (p *PaddedID) ID(id string) string

type Pod

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

func (*Pod) ID

func (p *Pod) ID() string

func (*Pod) Start

func (p *Pod) Start(ctx context.Context, rec chan output.Message) error

func (*Pod) Stop

func (p *Pod) Stop(ctx context.Context, rec chan output.Message) error

type PortForwardAPodRequest

type PortForwardAPodRequest struct {
	// Pod is the selected pod for this port forwarding
	Pod v1.Pod
	// LocalPort is the local port that will be selected to expose the PodPort
	LocalPort int
	// PodPort is the target port for the pod
	PodPort int
	// Steams configures where to write or read input from
	Streams genericclioptions.IOStreams
	// Stop is the channel used to manage the port forward lifecycle
	Stop <-chan struct{}
	// Ready communicates when the tunnel is ready to receive traffic
	Ready chan struct{}
}

type Runnable

type Runnable interface {
	ID() string
	Start(ctx context.Context, rec chan output.Message) error
	Stop(ctx context.Context, rec chan output.Message) error
}

func NewExecutable

func NewExecutable(logger *output.Logger, c *configuration.Executable) Runnable

func NewPod

func NewPod(logger *output.Logger, c *configuration.Pod) Runnable

type Runner

type Runner struct {
	Receiver      chan output.Message
	Configuration *configuration.Configuration
	Logger        *output.Logger
	// contains filtered or unexported fields
}

func New

func (*Runner) Run

func (r *Runner) Run(ctx context.Context, cfg *Runtime) error

func (*Runner) Stop

func (r *Runner) Stop(ctx context.Context) error

type Runtime

type Runtime struct {
	Executables []string
	Pods        []string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL