host

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2020 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connected

type Connected interface {
	ForwardUnixSocket(path string) (string, error)
}

Connected represents capabilities of connected host.

type Host

type Host struct {
	DirectConfig *direct.Config `json:"direct,omitempty" yaml:"direct,omitempty"`
	SSHConfig    *ssh.Config    `json:"ssh,omitempty" yaml:"ssh,omitempty"`
}

Host allows to forward TCP ports, UNIX sockets to local machine to establish communication with remote daemons.

func BuildConfig

func BuildConfig(h Host, d Host) Host

BuildConfig merges values from both host objects.

func (*Host) Validate

func (h *Host) Validate() error

Validate validates host configuration.

type Interface

type Interface interface {
	Connect() (Connected, error)
}

Interface represents exported host capabilities.

func New

func New(h *Host) (Interface, error)

New validates Host configuration and sets configured transport method.

Directories

Path Synopsis
ssh

Jump to

Keyboard shortcuts

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