RemoteDockers v1.4.0 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
Build configuration with hostname, port and SSL with Certificate Authority
Set label for this configuration
Link to this section Functions
Link to this function
get_options(node_config) View Source
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}
Link to this function
new(hostname) View Source
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}
Link to this function
new(hostname, port) View Source
Build configuration with specific hostname and port
Example:
iex> NodeConfig.new("192.168.99.100", 2345)
%NodeConfig{hostname: "192.168.99.100", port: 2345}
Link to this function
new(hostname, certfile, keyfile) View Source
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"
]
}
Link to this function
new(hostname, port, certfile, keyfile) View Source
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"
]
}
Link to this function
new(hostname, port, cacertfile, certfile, keyfile) View Source
Build configuration with hostname, port and SSL with Certificate Authority
Example:
iex> NodeConfig.new("192.168.99.100", 2345, "ca.pem", "cert.pem", "key.pem")
%NodeConfig{
hostname: "192.168.99.100",
port: 2345,
ssl: [
cacertfile: "ca.pem",
certfile: "cert.pem",
keyfile: "key.pem"
]
}
Link to this function
set_label(node_config, label) View Source
Set label for this configuration
Example:
iex> NodeConfig.new() |> NodeConfig.set_label("My Local Node")
%NodeConfig{
hostname: "localhost",
port: 2376,
label: "My Local Node"
}