options

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2025 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CONSOLE_CONFIG_FILENAME = "console.yaml"
	INITIAL_CONSOLE_CONFIG  = `` /* 178-byte string literal not displayed */

)
View Source
const (
	VERSION               = "0.4.1"
	IMG_VERSION           = "0.2.0"
	NETEM_ID              = "ntm"
	SERVER_CONFIG_FILE    = "/etc/gonetem/config.yaml"
	MINIMUM_SERVER_CONFIG = `` /* 277-byte string literal not displayed */

	INITIAL_SERVER_CONFIG = `` /* 2790-byte string literal not displayed */

)

Variables

View Source
var (
	ConsoleConfig = NetemConsoleConfig{}
)
View Source
var (
	ServerConfig = NetemServerConfig{}
)

Functions

func CreateServerConfig added in v0.1.1

func CreateServerConfig(config string) error

func GetDockerImageId added in v0.1.1

func GetDockerImageId(image string) string

func InitConsoleConfig added in v0.1.1

func InitConsoleConfig()

func InitServerConfig

func InitServerConfig()

func LoadConsoleTLSCredentials added in v0.2.0

func LoadConsoleTLSCredentials() (credentials.TransportCredentials, error)

func LoadServerTLSCredentials added in v0.2.0

func LoadServerTLSCredentials() (credentials.TransportCredentials, error)

func ParseServerConfig added in v0.1.1

func ParseServerConfig(config string) error

func SaveConsoleConfig added in v0.1.1

func SaveConsoleConfig() error

Types

type DockerConfigCommand added in v0.4.0

type DockerConfigCommand struct {
	Command    string
	CheckFiles []string
}

type DockerConfiguration added in v0.4.0

type DockerConfiguration struct {
	DestSuffix string
	Source     string
	Label      string
}

type DockerNodeConfig added in v0.4.0

type DockerNodeConfig struct {
	Type      string
	Image     string
	Volumes   []string
	LogOutput bool
	Commands  struct {
		Console    string
		Shell      string
		LoadConfig []DockerConfigCommand
		SaveConfig []DockerConfigCommand
	}
	ConfigurationFiles   []DockerConfiguration
	ConfigurationFolders []DockerConfiguration
}

type NetemConsoleConfig added in v0.1.1

type NetemConsoleConfig struct {
	Server   string
	Editor   string
	Terminal string
	Tls      TLSOptions
}

type NetemServerConfig

type NetemServerConfig struct {
	Listen  string
	Tls     TLSOptions
	Workdir string
	Docker  struct {
		Timeoutop int
		Nodes     struct {
			Router DockerNodeConfig
			Host   DockerNodeConfig
			Server DockerNodeConfig
		}
		ExtraNodes []DockerNodeConfig
		OvsImage   string
	}
}

type TLSOptions added in v0.2.0

type TLSOptions struct {
	Enabled bool
	Ca      string
	Cert    string
	Key     string
}

Jump to

Keyboard shortcuts

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