class SDM::Relay

Relay represents a StrongDM CLI installation running in relay mode.

Attributes

id[RW]

Unique identifier of the Relay.

name[RW]

Unique human-readable name of the Relay. Generated if not provided on create.

state[RW]

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

Public Class Methods

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

Public Instance Methods

to_json(options={}) click to toggle source
# File lib/models/porcelain.rb, line 4048
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