local

package
v0.10.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2018 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const DraftLabelKey = "draft"

DraftLabelKey is the label selector key on a pod that allows

us to identify which draft app a pod is associated with

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Name      string
	Namespace string
	Container string
}

App encapsulates information about an application to connect to

Name is the name of the application
Namespace is the Kubernetes namespace it is deployed in
Container is the name the name of the application container to connect to

func DeployedApplication

func DeployedApplication(draftTomlPath, draftEnvironment string) (*App, error)

DeployedApplication returns deployment information about the deployed instance

of the source code given a path to your draft.toml file and the name of the
draft environment

func (*App) Connect

func (a *App) Connect(clientset kubernetes.Interface, clientConfig *restclient.Config) (*Connection, error)

Connect creates a local tunnel to a Kubernetes pod running the application and returns the connection information

func (*App) NewTunnel

func (a *App) NewTunnel(clientset kubernetes.Interface, config *restclient.Config) (*kube.Tunnel, string, error)

NewTunnel creates and returns a tunnel to a Kubernetes pod running the application

type Connection

type Connection struct {
	Tunnel    *kube.Tunnel
	PodName   string
	Clientset kubernetes.Interface
}

Connection encapsulated information to connect to am application

func (*Connection) RequestLogStream

func (c *Connection) RequestLogStream(app *App, logLines int64) (io.ReadCloser, error)

RequestLogStream returns a stream of the application pod's logs

Jump to

Keyboard shortcuts

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