client

package
v0.0.0-...-a8e7fa4 Latest Latest
Warning

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

Go to latest
Published: May 31, 2016 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BadGateway = `` /* 353-byte string literal not displayed */

)

Variables

This section is empty.

Functions

func LoadTLSConfig

func LoadTLSConfig(rootCertPaths []string) (*tls.Config, error)

func Main

func Main()

func SaveAuthToken

func SaveAuthToken(configPath, authtoken string) (err error)

Types

type ClientMetrics

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

func NewClientMetrics

func NewClientMetrics() *ClientMetrics

type ClientModel

type ClientModel struct {
	log.Logger
	// contains filtered or unexported fields
}

func (ClientModel) GetBytesInMetrics

func (c ClientModel) GetBytesInMetrics() (metrics.Counter, metrics.Histogram)

func (ClientModel) GetBytesOutMetrics

func (c ClientModel) GetBytesOutMetrics() (metrics.Counter, metrics.Histogram)

func (ClientModel) GetClientVersion

func (c ClientModel) GetClientVersion() string

func (ClientModel) GetConnStatus

func (c ClientModel) GetConnStatus() mvc.ConnStatus

func (ClientModel) GetConnectionMetrics

func (c ClientModel) GetConnectionMetrics() (metrics.Meter, metrics.Timer)

func (ClientModel) GetProtocols

func (c ClientModel) GetProtocols() []proto.Protocol

mvc.State interface

func (ClientModel) GetServerVersion

func (c ClientModel) GetServerVersion() string

func (ClientModel) GetTunnels

func (c ClientModel) GetTunnels() []mvc.Tunnel

func (ClientModel) GetUpdateStatus

func (c ClientModel) GetUpdateStatus() mvc.UpdateStatus

func (*ClientModel) PlayRequest

func (c *ClientModel) PlayRequest(tunnel mvc.Tunnel, payload []byte)

mvc.Model interface

func (*ClientModel) Run

func (c *ClientModel) Run()

func (ClientModel) SetUpdateStatus

func (c ClientModel) SetUpdateStatus(updateStatus mvc.UpdateStatus)

func (*ClientModel) Shutdown

func (c *ClientModel) Shutdown()

type Configuration

type Configuration struct {
	HttpProxy          string                          `yaml:"http_proxy,omitempty"`
	ServerAddr         string                          `yaml:"server_addr,omitempty"`
	InspectAddr        string                          `yaml:"inspect_addr,omitempty"`
	TrustHostRootCerts bool                            `yaml:"trust_host_root_certs,omitempty"`
	AuthToken          string                          `yaml:"auth_token,omitempty"`
	Tunnels            map[string]*TunnelConfiguration `yaml:"tunnels,omitempty"`
	LogTo              string                          `yaml:"-"`
	Path               string                          `yaml:"-"`
}

func LoadConfiguration

func LoadConfiguration(opts *Options) (config *Configuration, err error)

type Controller

type Controller struct {
	// Controller logger
	log.Logger
	// contains filtered or unexported fields
}

The MVC Controller

func NewController

func NewController() *Controller

public interface

func (*Controller) AddView

func (ctl *Controller) AddView(v mvc.View)

func (*Controller) GetModel

func (ctl *Controller) GetModel() *ClientModel

func (*Controller) GetWebInspectAddr

func (ctl *Controller) GetWebInspectAddr() string

func (*Controller) Go

func (ctl *Controller) Go(fn func())

func (*Controller) PlayRequest

func (ctl *Controller) PlayRequest(tunnel mvc.Tunnel, payload []byte)

func (*Controller) Run

func (ctl *Controller) Run(config *Configuration)

func (*Controller) SetupModel

func (ctl *Controller) SetupModel(config *Configuration) *ClientModel

func (*Controller) Shutdown

func (ctl *Controller) Shutdown(message string)

func (*Controller) State

func (ctl *Controller) State() mvc.State

func (*Controller) Update

func (ctl *Controller) Update(state mvc.State)

func (*Controller) Updates

func (ctl *Controller) Updates() *util.Broadcast

type Options

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

func ParseArgs

func ParseArgs() (opts *Options, err error)

type TunnelConfiguration

type TunnelConfiguration struct {
	Subdomain  string            `yaml:"subdomain,omitempty"`
	Hostname   string            `yaml:"hostname,omitempty"`
	Protocols  map[string]string `yaml:"proto,omitempty"`
	HttpAuth   string            `yaml:"auth,omitempty"`
	RemotePort uint16            `yaml:"remote_port,omitempty"`
}

Directories

Path Synopsis
views
term
shared internal functions for handling output to the terminal
shared internal functions for handling output to the terminal
web
interactive web user interface
interactive web user interface

Jump to

Keyboard shortcuts

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