View Source Horizon.Server (horizon v0.2.5)

Server configuration to define upstream servers for nginx.conf.

Summary

Functions

Create a new server configuration.

Types

t()

@type t() :: %Horizon.Server{internal_ip: String.t(), port: integer()}

Functions

new(opts \\ [])

@spec new(list()) :: t()

Create a new server configuration.

Examples

iex> Horizon.Server.new()
%Horizon.Server{internal_ip: "127.0.0.1", port: 4000}
iex> Horizon.Server.new(internal_ip: "10.0.0.2", port: 4001)
%Horizon.Server{internal_ip: "10.0.0.2", port: 4001}