Class: SDM::Gateway
- Inherits:
-
Object
- Object
- SDM::Gateway
- Defined in:
- lib/models/porcelain.rb
Overview
Gateway represents a StrongDM CLI installation running in gateway mode.
Instance Attribute Summary collapse
-
#bind_address ⇒ Object
The hostname/port tuple which the gateway daemon will bind to.
-
#gateway_filter ⇒ Object
GatewayFilter can be used to restrict the peering between relays and gateways.
-
#id ⇒ Object
Unique identifier of the Gateway.
-
#listen_address ⇒ Object
The public hostname/port tuple at which the gateway will be accessible to clients.
-
#name ⇒ Object
Unique human-readable name of the Gateway.
-
#state ⇒ Object
The current state of the gateway.
-
#tags ⇒ Object
Tags is a map of key, value pairs.
Instance Method Summary collapse
-
#initialize(id: nil, name: nil, state: nil, listen_address: nil, bind_address: nil, tags: nil, gateway_filter: nil) ⇒ Gateway
constructor
A new instance of Gateway.
- #to_json(options = {}) ⇒ Object
Constructor Details
#initialize(id: nil, name: nil, state: nil, listen_address: nil, bind_address: nil, tags: nil, gateway_filter: nil) ⇒ Gateway
Returns a new instance of Gateway.
6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 |
# File 'lib/models/porcelain.rb', line 6060 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 != nil @tags = end if gateway_filter != nil @gateway_filter = gateway_filter end end |
Instance Attribute Details
#bind_address ⇒ Object
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>”.
6053 6054 6055 |
# File 'lib/models/porcelain.rb', line 6053 def bind_address @bind_address end |
#gateway_filter ⇒ Object
GatewayFilter can be used to restrict the peering between relays and gateways.
6058 6059 6060 |
# File 'lib/models/porcelain.rb', line 6058 def gateway_filter @gateway_filter end |
#id ⇒ Object
Unique identifier of the Gateway.
6043 6044 6045 |
# File 'lib/models/porcelain.rb', line 6043 def id @id end |
#listen_address ⇒ Object
The public hostname/port tuple at which the gateway will be accessible to clients.
6050 6051 6052 |
# File 'lib/models/porcelain.rb', line 6050 def listen_address @listen_address end |
#name ⇒ Object
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.
6045 6046 6047 |
# File 'lib/models/porcelain.rb', line 6045 def name @name end |
#state ⇒ Object
The current state of the gateway. One of: “new”, “verifying_restart”, “restarting”, “started”, “stopped”, “dead”, “unknown”
6048 6049 6050 |
# File 'lib/models/porcelain.rb', line 6048 def state @state end |
#tags ⇒ Object
Tags is a map of key, value pairs.
6055 6056 6057 |
# File 'lib/models/porcelain.rb', line 6055 def @tags end |
Instance Method Details
#to_json(options = {}) ⇒ Object
6092 6093 6094 6095 6096 6097 6098 |
# File 'lib/models/porcelain.rb', line 6092 def to_json( = {}) hash = {} self.instance_variables.each do |var| hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var end hash.to_json end |