[−][src]Function pact_mock_server::start_tls_mock_server_with_config
pub fn start_tls_mock_server_with_config(
id: String,
pact: RequestResponsePact,
addr: SocketAddr,
tls: &ServerConfig,
config: MockServerConfig
) -> Result<i32, String>
Starts a TLS mock server with the given ID, pact and port number. The ID needs to be unique. A port
number of 0 will result in an auto-allocated port by the operating system. Returns the port
that the mock server is running on wrapped in a Result
.
id
- Unique ID for the mock server.pact
- Pact model to use for the mock server.addr
- Socket address that the server should listen on.tls
- TLS config.config
- Configuration for the mock server
Errors
An error with a message will be returned in the following conditions:
- If a mock server is not able to be started