RemoteDockers v1.3.3 RemoteDockers.NodeConfig View Source
Link to this section Summary
Functions
Get HTTPoison default options with ssl if enabled
Build configuration with defaults
Build configuration with a specific hostname
Build configuration with specific hostname and port
Build configuration with SSL
Build configuration with hostname, port and SSL
Set label for this configuration
Example:
iex> NodeConfig.new() |> NodeConfig.set_label("My Local Node")
%NodeConfig{
hostname: "localhost",
port: 2376,
label: "My Local Node"
}
Link to this section Functions
Get HTTPoison default options with ssl if enabled
Build configuration with defaults
default:
hostname: "localhost"
port: 2376
Example:
iex> NodeConfig.new()
%NodeConfig{hostname: "localhost", port: 2376}
Build configuration with a specific hostname
default:
port: 2376
Example:
iex> NodeConfig.new("192.168.99.100")
%NodeConfig{hostname: "192.168.99.100", port: 2376}
Build configuration with specific hostname and port
Example:
iex> NodeConfig.new("192.168.99.100", 2345)
%NodeConfig{hostname: "192.168.99.100", port: 2345}
Build configuration with SSL
default:
port: 2376
Example:
iex> NodeConfig.new("192.168.99.100", "cert.pem", "key.pem")
%NodeConfig{
hostname: "192.168.99.100",
port: 2376,
ssl: [
certfile: "cert.pem",
keyfile: "key.pem"
]
}
Build configuration with hostname, port and SSL
Example:
iex> NodeConfig.new("192.168.99.100", 2345, "cert.pem", "key.pem")
%NodeConfig{
hostname: "192.168.99.100",
port: 2345,
ssl: [
certfile: "cert.pem",
keyfile: "key.pem"
]
}