tunneler

package
v1.7.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2017 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TunnelSyncHealthChecker

func TunnelSyncHealthChecker(tunneler Tunneler) func(req *http.Request) error

TunnelSyncHealthChecker returns a health func that indicates if a tunneler is healthy. It's compatible with healthz.NamedCheck

Types

type AddressFunc

type AddressFunc func() (addresses []string, err error)

type InstallSSHKey

type InstallSSHKey func(user string, data []byte) error

type SSHTunneler

type SSHTunneler struct {
	SSHUser        string
	SSHKeyfile     string
	InstallSSHKey  InstallSSHKey
	HealthCheckURL *url.URL
	// contains filtered or unexported fields
}

func (*SSHTunneler) Dial

func (c *SSHTunneler) Dial(net, addr string) (net.Conn, error)

func (*SSHTunneler) Run

func (c *SSHTunneler) Run(getAddresses AddressFunc)

Run establishes tunnel loops and returns

func (*SSHTunneler) SecondsSinceSSHKeySync

func (c *SSHTunneler) SecondsSinceSSHKeySync() int64

func (*SSHTunneler) SecondsSinceSync

func (c *SSHTunneler) SecondsSinceSync() int64

func (*SSHTunneler) Stop

func (c *SSHTunneler) Stop()

Stop gracefully shuts down the tunneler

type Tunneler

type Tunneler interface {
	Run(AddressFunc)
	Stop()
	Dial(net, addr string) (net.Conn, error)
	SecondsSinceSync() int64
	SecondsSinceSSHKeySync() int64
}

func New

func New(sshUser, sshKeyfile string, healthCheckURL *url.URL, installSSHKey InstallSSHKey) Tunneler

Jump to

Keyboard shortcuts

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