host

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2023 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Overview

Package host collects all transport interface implementations and provides an unified configuration interface for these.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Host

type Host struct {
	// DirectConfig indicates, that no forwarding should occur, so addresses will
	// be returned as given.
	DirectConfig *direct.Config `json:"direct,omitempty"`

	// SSHConfig configures given addresses to be forwarded using SSH tunneling.
	SSHConfig *ssh.Config `json:"ssh,omitempty"`
}

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

Exactly one transport method must be configured.

func BuildConfig

func BuildConfig(config, defaults Host) Host

BuildConfig merges values from both host objects. This is a helper method used for building hierarchical configuration.

func (*Host) New added in v0.2.0

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

New validates Host configuration and sets configured transport method.

func (*Host) Validate

func (h *Host) Validate() error

Validate validates host configuration.

Directories

Path Synopsis
Package transport provides interfaces for forwarding connections.
Package transport provides interfaces for forwarding connections.
direct
Package direct is a transport.Interface implementation, which simply forwards given addresses "as is", without any modifications.
Package direct is a transport.Interface implementation, which simply forwards given addresses "as is", without any modifications.
ssh
Package ssh is a transport.Interface implementation, which forwards given addresses over specified SSH host.
Package ssh is a transport.Interface implementation, which forwards given addresses over specified SSH host.

Jump to

Keyboard shortcuts

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