config

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2022 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cloud

type Cloud string
var (
	CloudGCP    Cloud = "gcp"
	CloudDocker Cloud = "docker"
)

type DockerConfig

type DockerConfig struct {
	// ContainerID is the ID of the container to run
	ContainerID string `yaml:"containerID"`
}

type GCPConfig

type GCPConfig struct {
	// InstanceID is the id of the GCP instance
	InstanceID string `yaml:"instanceID"`

	// Project name is the project the instance is in
	Project string `yaml:"project"`

	// Zone is the zone the instance is in
	Zone string `yaml:"zone"`
}

type ProxyConfig

type ProxyConfig struct {
	// ListenAddress is the address to listen on (the proxy)
	ListenAddress string `yaml:"listenAddress"`

	// The Cloud this instance is in
	Cloud       Cloud         `yaml:"cloud"`
	Server      *ServerConfig `yaml:"server"`
	CloudConfig struct {
		GCP    *GCPConfig    `yaml:"gcp"`
		Docker *DockerConfig `yaml:"docker"`
	} `yaml:"cloudConfig"`
}

ProxyConfig is a configuration file for the proxy

func LoadProxyConfig

func LoadProxyConfig(path string) (*ProxyConfig, error)

LoadProxyConfig loads a proxy configuration file

type ServerConfig

type ServerConfig struct {
	// Hostname of the remote server
	Hostname string `yaml:"hostname"`

	// Port of the remote server
	Port uint `yaml:"port"`

	// ProtocolVersion of the server
	ProtocolVersion uint `yaml:"protocolVersion"`

	// Version of the server
	Version string `yaml:"textVersion"`
}

Server configuration block

Jump to

Keyboard shortcuts

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