...

Package portal

Overview ▾

Package portal provides SSH portals to applications.

Constants

const (
    // ListenTimeout is the maximum time to start listening on an address.
    ListenTimeout = 1 * time.Second

    // IdleTimeout is the maximum time for a connection to be inactive.
    IdleTimeout = 1 * time.Minute
)

type Portal

Portal is an SSH portal to an application.

type Portal struct {
    Name    string
    Address string
    Command []string
    Server  *ssh.Server
}

func New

func New(name string, address string, command []string) (*Portal, error)

New opens an SSH portal to an application.

func (*Portal) Close

func (p *Portal) Close()

Close closes the portal immediately.

func (*Portal) Shutdown

func (p *Portal) Shutdown()

Shutdown closes the portal without interrupting active connections.