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.


Instance Method Detail

def exporter_port : Int32 #

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


def exporter_port=(exporter_port : Int32) #

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


def last_request_succeded : Bool | Nil #

Boolean representing if last request of the plug was successful.


def last_request_succeded=(last_request_succeded : Bool | Nil) #

Boolean representing if last request of the plug was successful.


def plug_auth_password : String | Nil #

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


def plug_auth_password=(plug_auth_password : String | Nil) #

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


def plug_auth_username : String | Nil #

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


def plug_auth_username=(plug_auth_username : String | Nil) #

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


def plug_host : String #

Hostname or ip address of the plug.


def plug_host=(plug_host : String) #

Hostname or ip address of the plug.


def plug_port : Int32 #

Port of the plug api.


def plug_port=(plug_port : Int32) #

Port of the plug api.