transport

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2023 License: Apache-2.0 Imports: 12 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DestroyClient

func DestroyClient(t Transport) error

func DestroyServer

func DestroyServer(t Transport) error

func GenerateSSLCert

func GenerateSSLCert() (*bytes.Buffer, *bytes.Buffer, *bytes.Buffer, error)

Types

type Options

type Options struct {
	ProxyURL           string
	ProxyUsername      string
	ProxyPassword      string
	NoVerifyCA         bool
	CAVerifyLevel      string
	StunnelClientImage string
	StunnelServerImage string
}

type Transport

type Transport interface {
	// NamespacedNamePair returns a source and a destination pair to identify this transport
	NamespacedNamePair() meta.NamespacedNamePair
	//.CA returns CA used by the transport
	CA() *bytes.Buffer
	// Crt returns certificate used by the transport for encryption
	Crt() *bytes.Buffer
	Key() *bytes.Buffer
	// Port returns a port on which the transport listens for connections
	Port() int32
	// ExposedPort returns an exposed port for transfers to use
	ExposedPort() int32
	// ClientContainers returns a list of containers transfers can add to their client Pods
	ClientContainers() []v1.Container
	// ClientVolumes returns a list of volumes transfers can add to their client Pods
	ClientVolumes() []v1.Volume
	// ServerContainers returns a list of containers transfers can add to their server Pods
	ServerContainers() []v1.Container
	// ServerVolumes returns a list of volumes transfers can add to their server Pods
	ServerVolumes() []v1.Volume
	Direct() bool
	CreateServer(client.Client, endpoint.Endpoint) error
	CreateClient(client.Client, endpoint.Endpoint) error
	Options() *Options
	// Type
	Type() TransportType
}

Transport knows how to create an end to end tunnel for a transfer to work on

func CreateClient

func CreateClient(t Transport, c client.Client, e endpoint.Endpoint) (Transport, error)

func CreateServer

func CreateServer(t Transport, c client.Client, e endpoint.Endpoint) (Transport, error)

type TransportType

type TransportType string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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