Return mapped ports when requesting runners
We now store the mapped ports returned by Nomad locally in our runner struct and return them when requesting the runner. The returned ip address is in most Nomad setups not reachable from external users.
This commit is contained in:
@@ -42,9 +42,17 @@ type ExecutionEnvironmentRequest struct {
|
||||
ExposedPorts []uint16 `json:"exposedPorts"`
|
||||
}
|
||||
|
||||
// MappedPort contains the mapping from exposed port inside the container to the host address
|
||||
// outside the container.
|
||||
type MappedPort struct {
|
||||
ExposedPort uint `json:"exposedPort"`
|
||||
HostAddress string `json:"hostAddress"`
|
||||
}
|
||||
|
||||
// RunnerResponse is the expected response when providing a runner.
|
||||
type RunnerResponse struct {
|
||||
ID string `json:"runnerId"`
|
||||
ID string `json:"runnerId"`
|
||||
MappedPorts []*MappedPort `json:"mappedPorts"`
|
||||
}
|
||||
|
||||
// ExecutionResponse is the expected response when creating an execution for a runner.
|
||||
|
Reference in New Issue
Block a user