MingaAgent.RemoteAPI.SessionInfo (Minga v0.1.0)

Copy Markdown View Source

Session record returned by the remote API broker.

Summary

Types

Explicit metadata availability for a remote session.

Metadata accepted from current and compatible older remote nodes.

t()

Functions

Creates a remote session record from a manager-owned listing and token.

Creates a session info record with available metadata.

Normalizes current and supported older remote listing records.

Normalizes a remote session listing while preserving its order.

Types

details()

@type details() ::
  {:available, metadata()}
  | {:unavailable, MingaAgent.SessionListing.unavailable_reason()}

Explicit metadata availability for a remote session.

metadata()

@type metadata() :: MingaAgent.SessionMetadata.t() | map()

Metadata accepted from current and compatible older remote nodes.

t()

@type t() :: %MingaAgent.RemoteAPI.SessionInfo{
  details: details(),
  metadata: metadata() | nil,
  pid: pid(),
  session_id: String.t(),
  token: String.t()
}

Functions

from_listing(session_listing, token)

@spec from_listing(MingaAgent.SessionListing.t(), String.t()) :: t()

Creates a remote session record from a manager-owned listing and token.

new(session_id, pid, token, metadata)

@spec new(String.t(), pid(), String.t(), MingaAgent.SessionMetadata.t()) :: t()

Creates a session info record with available metadata.

normalize(info)

@spec normalize(term()) :: {:ok, t()} | {:error, :unsupported_session_listing}

Normalizes current and supported older remote listing records.

normalize_all(sessions)

@spec normalize_all(term()) :: {:ok, [t()]} | {:error, :unsupported_session_listing}

Normalizes a remote session listing while preserving its order.