class ShellyplugExporter::Config

Overview

A configuration entry for the program.

Config can be loaded from environment variables and adjusted.

config = ShellyplugExporter::Config.new
config.exporter_port = my_exporter_port

Defined in:

shellyplug_exporter/config.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new #

Creates a new instance of ShellyplugExporter::Config based on environment variables.


[View source]

Instance Method Detail

def exporter_port : Int32 #

Port through which the web server of the exporter will be accessible.


[View source]
def exporter_port=(exporter_port : Int32) #

Port through which the web server of the exporter will be accessible.


[View source]
def last_request_succeded : Bool | Nil #

Boolean representing if last request of the plug was successful.


[View source]
def last_request_succeded=(last_request_succeded : Bool | Nil) #

Boolean representing if last request of the plug was successful.


[View source]
def plug_auth_password : String | Nil #

Password for authentication of the plug (can be configured in the plug).


[View source]
def plug_auth_password=(plug_auth_password : String | Nil) #

Password for authentication of the plug (can be configured in the plug).


[View source]
def plug_auth_username : String | Nil #

Username for authentication of the plug (can be configured in the plug).


[View source]
def plug_auth_username=(plug_auth_username : String | Nil) #

Username for authentication of the plug (can be configured in the plug).


[View source]
def plug_host : String #

Hostname or ip address of the plug.


[View source]
def plug_host=(plug_host : String) #

Hostname or ip address of the plug.


[View source]
def plug_port : Int32 #

Port of the plug api.


[View source]
def plug_port=(plug_port : Int32) #

Port of the plug api.


[View source]