Documentation ¶
Index ¶
- Constants
- Variables
- func Install(name string, commands ...Command) framework.InstallFunc
- type Command
- type Deployment
- type ExternalService
- type UniversalDeployment
- func (u *UniversalDeployment) Delete(cluster framework.Cluster) error
- func (u *UniversalDeployment) Deploy(cluster framework.Cluster) error
- func (u *UniversalDeployment) Exec(cmd ...string) (string, string, error)
- func (u *UniversalDeployment) GetCert() string
- func (u *UniversalDeployment) GetExternalAppAddress() string
- func (u *UniversalDeployment) GetExternalPort(internalPort uint32) (uint32, bool)
- func (u *UniversalDeployment) Name() string
Constants ¶
View Source
const ( DeploymentName = "externalservice-" HttpServer = "http-server" HttpsServer = "https-server" TcpSink = "tcp-sink" )
Variables ¶
View Source
var ExternalServiceCommand = func(port uint32, message string) Command { return []string{"ncat", "-lk", "-p", fmt.Sprintf("%d", port), "--sh-exec", fmt.Sprintf("'echo \"HTTP/1.1 200 OK\n\n%s\n\"'", message)} }
View Source
var UniversalAppEchoServer = ExternalServiceCommand(80, "Echo 80")
View Source
var UniversalAppHttpsEchoServer = Command([]string{"ncat",
"-lk", "-p", "443",
"--ssl", "--ssl-cert", "/server-cert.pem", "--ssl-key", "/server-key.pem",
"--sh-exec", "'echo \"HTTP/1.1 200 OK\n\n HTTPS Echo\n\"'"})
View Source
var UniversalEchoServer = func(port int, tls bool) Command { args := []string{ "test-server", "echo", "--instance", fmt.Sprintf("echo-%d", port), "--port", fmt.Sprintf("%d", port), } if tls { args = append(args, "--crt", "/server-cert.pem", "--key", "/server-key.pem", "--tls") } return args }
View Source
var UniversalTCPSink = Command([]string{"ncat", "-lk", "9999", ">", "/nc.out"})
Functions ¶
Types ¶
type Deployment ¶
type Deployment interface { framework.Deployment ExternalService }
type ExternalService ¶
type UniversalDeployment ¶ added in v1.8.1
type UniversalDeployment struct {
// contains filtered or unexported fields
}
func (*UniversalDeployment) Delete ¶ added in v1.8.1
func (u *UniversalDeployment) Delete(cluster framework.Cluster) error
func (*UniversalDeployment) Deploy ¶ added in v1.8.1
func (u *UniversalDeployment) Deploy(cluster framework.Cluster) error
func (*UniversalDeployment) Exec ¶ added in v1.8.1
func (u *UniversalDeployment) Exec(cmd ...string) (string, string, error)
func (*UniversalDeployment) GetCert ¶ added in v1.8.1
func (u *UniversalDeployment) GetCert() string
func (*UniversalDeployment) GetExternalAppAddress ¶ added in v1.8.1
func (u *UniversalDeployment) GetExternalAppAddress() string
func (*UniversalDeployment) GetExternalPort ¶ added in v1.8.1
func (u *UniversalDeployment) GetExternalPort(internalPort uint32) (uint32, bool)
func (*UniversalDeployment) Name ¶ added in v1.8.1
func (u *UniversalDeployment) Name() string
Click to show internal directories.
Click to hide internal directories.