conf

package
v0.0.0-...-be7c396 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2021 License: Apache-2.0 Imports: 11 Imported by: 2

Documentation

Index

Constants

View Source
const (
	DefaultConfigFileName = ".teleconsolerc"
	DefaultServerHost     = "teleconsole.com"
	DefaultServerPort     = "443"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// APIEndpointURL is the API of the Teleconsole server API
	APIEndpointURL *url.URL

	// Verbosity defines the level of debugging output (greater means
	// more output)
	Verbosity int

	// when set, it means that instead of launching shell, another
	// command is launched
	RunCommand string

	// command line arguments
	Args []string

	// if 'true', the client will trust unknown SSL certificates
	// can be set via -insecure flag
	InsecureHTTPS bool

	// Ports to forward
	ForwardPorts []client.ForwardedPort

	// Forward-by-invite:
	ForwardPort *client.ForwardedPort

	// IdentityFile contains a full file path of the SSH key file to use.
	// For "start session" it points to a public key, but for "join" it
	// points to a private key.
	IdentityFile string
}

Config stores the configuration of Teleconsole process

func Get

func Get() (c *Config, err error)

Get() returns Teleconsole configuration: default values overwritten via config file

func (*Config) GetEndpointHost

func (this *Config) GetEndpointHost() string

GetEndpointHost returns the hostname of the Teleconsole server endpoint (without port)

func (*Config) SetEndpointHost

func (this *Config) SetEndpointHost(hostPort string) (err error)

SetEndpointHost sets the Teleconsole server host:port pair to the configuration

Jump to

Keyboard shortcuts

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