HostKit.Endpoint (host_kit v0.1.0-beta.1)

Copy Markdown View Source

Reference to a named listener/endpoint exposed by a HostKit service.

Summary

Types

t()

@type t() :: %HostKit.Endpoint{
  health: String.t() | nil,
  host: String.t() | nil,
  meta: map(),
  name: atom() | String.t(),
  port: pos_integer() | nil,
  protocol: atom() | nil,
  service: atom() | String.t()
}

Functions

declaration(name, opts)

@spec declaration(
  atom() | String.t(),
  keyword()
) :: t()

new(service, name \\ :default, opts \\ [])

@spec new(atom() | String.t(), atom() | String.t(), keyword()) :: t()

resolved?(endpoint)

@spec resolved?(t()) :: boolean()

upstream(endpoint)

@spec upstream(t()) :: String.t()

url(endpoint)

@spec url(t()) :: String.t()