libsshub

package
v0.0.0-...-c14f516 Latest Latest
Warning

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

Go to latest
Published: May 22, 2016 License: BSD-2-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DiscardChannels

func DiscardChannels(chanReqs <-chan ssh.NewChannel)

func InstallHttpHandlers

func InstallHttpHandlers(hub *Hub)

Types

type APIError

type APIError struct {
	Code    string `json:"code"`
	Message string `json:"message"`
}

type Hub

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

func NewHub

func NewHub(privateKey ssh.Signer) *Hub

func (*Hub) GetTunnelByUser

func (hub *Hub) GetTunnelByUser(user string) *Tunnel

func (*Hub) Listen

func (hub *Hub) Listen(addr string) error
type Link struct {
	From        Tunnel `json:"from"`
	To          Tunnel `json:"to"`
	Port        uint32 `json:"port"`
	Established bool   `json:"-"`
}

type Tunnel

type Tunnel struct {
	PublicKey string   `json:"public_key"`
	User      string   `json:"user"`
	Link      *Link    `json:"-"`
	Conn      ssh.Conn `json:"-"`
}

func (*Tunnel) IsSource

func (tun *Tunnel) IsSource() bool

func (*Tunnel) Serialize

func (tun *Tunnel) Serialize() TunnelStatus

func (*Tunnel) String

func (tun *Tunnel) String() string

type TunnelStatus

type TunnelStatus struct {
	*Tunnel
	Connected bool `json:"connected"`
}

Jump to

Keyboard shortcuts

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