Documentation ¶
Index ¶
- func NewTransport(opts TransportOpts) (it.Transport, error)
- type Transport
- func (t Transport) Close() error
- func (t Transport) Copy(ctx context.Context, src it.Copyable, dst string) error
- func (t Transport) Run(ctx context.Context, cmd it.Command) (stdout, stderr string, err error)
- func (t Transport) Stream(ctx context.Context, command it.Command) (stdout, stderr io.Reader, errC chan error)
- func (t Transport) Type() it.TransportType
- type TransportOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTransport ¶
func NewTransport(opts TransportOpts) (it.Transport, error)
NewTransport takes transport opts and return a new instance of the kubernetes transport.
Types ¶
type Transport ¶
type Transport struct { Client kubernetes.Client Namespace string Pod string Container string }
Transport is the kubernetes transport. It's public because sometimes callers need to access the raw client and data.
func (Transport) Copy ¶
Copy copies the copyable src to the dst on a Pod as specified in the transport options.
func (Transport) Run ¶
Run runs the provided command on a remote Pod as specified th in the transport config. Run blocks until the command execution has completed.
func (Transport) Stream ¶
func (t Transport) Stream(ctx context.Context, command it.Command) (stdout, stderr io.Reader, errC chan error)
Stream runs the provided command on a remote Pod and streams the results. Stream does not block and is done when the error channel has either an error or nil.
func (Transport) Type ¶
func (t Transport) Type() it.TransportType
Click to show internal directories.
Click to hide internal directories.