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.
5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 |
# File 'lib/models/porcelain.rb', line 5799 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>”.
5792 5793 5794 |
# File 'lib/models/porcelain.rb', line 5792 def bind_address @bind_address end |
#gateway_filter ⇒ Object
GatewayFilter can be used to restrict the peering between relays and gateways.
5797 5798 5799 |
# File 'lib/models/porcelain.rb', line 5797 def gateway_filter @gateway_filter end |
#id ⇒ Object
Unique identifier of the Gateway.
5782 5783 5784 |
# File 'lib/models/porcelain.rb', line 5782 def id @id end |
#listen_address ⇒ Object
The public hostname/port tuple at which the gateway will be accessible to clients.
5789 5790 5791 |
# File 'lib/models/porcelain.rb', line 5789 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.
5784 5785 5786 |
# File 'lib/models/porcelain.rb', line 5784 def name @name end |
#state ⇒ Object
The current state of the gateway. One of: “new”, “verifying_restart”, “restarting”, “started”, “stopped”, “dead”, “unknown”
5787 5788 5789 |
# File 'lib/models/porcelain.rb', line 5787 def state @state end |
#tags ⇒ Object
Tags is a map of key, value pairs.
5794 5795 5796 |
# File 'lib/models/porcelain.rb', line 5794 def @tags end |
Instance Method Details
#to_json(options = {}) ⇒ Object
5831 5832 5833 5834 5835 5836 5837 |
# File 'lib/models/porcelain.rb', line 5831 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 |