config

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2020 License: Apache-2.0 Imports: 1 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SHELL_LIST = [...]string{
	"/bin/bash",
	"/bin/ash",
	"/bin/sh",
}

Functions

This section is empty.

Types

type BackendConfig

type BackendConfig struct {
	Type   string // docker or kubectl (for now)
	Docker DockerConfig
	Kube   KubeConfig
	GRPC   GRPCConfig
}

type Config

type Config struct {
	Debug   bool
	Backend BackendConfig
	Server  ServerConfig
}

func New added in v0.1.6

func New() *Config

type ControlConfig added in v0.1.4

type ControlConfig struct {
	Enable  bool
	All     bool
	Start   bool
	Stop    bool
	Restart bool
}

type DockerConfig

type DockerConfig struct {
	DockerHost string // default is /var/run/docker.sock
	PsOptions  string
}

type GRPCConfig added in v0.1.6

type GRPCConfig struct {
	Servers []string
	Auth    string
	Proxy   string // http or socks5
}

type KubeConfig added in v0.1.4

type KubeConfig struct {
	ConfigPath string // normally is $HOME/.kube/config
}

type ServerConfig added in v0.1.6

type ServerConfig struct {
	Address  string
	Port     int
	GrpcPort int
	IdleTime time.Duration

	Credential      string
	EnableReconnect bool
	ReconnectTime   int
	MaxConnection   int
	WSOrigin        string
	Term            string `default:"xterm"`
	ShowLocation    bool
	Collaborate     bool

	// audit
	EnableAudit bool
	AuditLogDir string `default:"log"`

	Control ControlConfig
}

Jump to

Keyboard shortcuts

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