class SDM::Gateway

Gateway represents a StrongDM CLI installation running in gateway mode.

Attributes

bind_address[RW]

The hostname/port tuple which the gateway daemon will bind to. If not provided on create, set to “0.0.0.0:<listen_address_port>”.

gateway_filter[RW]

GatewayFilter can be used to restrict the peering between relays and gateways.

id[RW]

Unique identifier of the Gateway.

listen_address[RW]

The public hostname/port tuple at which the gateway will be accessible to clients.

name[RW]

Unique human-readable name of the Gateway. Node names must include only letters, numbers, and hyphens (no spaces, underscores, or other special characters). Generated if not provided on create.

state[RW]

The current state of the gateway. One of: “new”, “verifying_restart”, “restarting”, “started”, “stopped”, “dead”, “unknown”

tags[RW]

Tags is a map of key, value pairs.

Public Class Methods

new( id: nil, name: nil, state: nil, listen_address: nil, bind_address: nil, tags: nil, gateway_filter: nil ) click to toggle source
# File lib/models/porcelain.rb, line 6129
def initialize(
  id: nil,
  name: nil,
  state: nil,
  listen_address: nil,
  bind_address: nil,
  tags: nil,
  gateway_filter: nil
)
  if id != nil
    @id = id
  end
  if name != nil
    @name = name
  end
  if state != nil
    @state = state
  end
  if listen_address != nil
    @listen_address = listen_address
  end
  if bind_address != nil
    @bind_address = bind_address
  end
  if tags != nil
    @tags = tags
  end
  if gateway_filter != nil
    @gateway_filter = gateway_filter
  end
end

Public Instance Methods

to_json(options = {}) click to toggle source
# File lib/models/porcelain.rb, line 6161
def to_json(options = {})
  hash = {}
  self.instance_variables.each do |var|
    hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var
  end
  hash.to_json
end