Constructor
new Service(options)
Creates a new class with the given options.
Parameters:
| Name | Type | Description |
|---|---|---|
options |
object | See getDefaultOptions() for more details. |
- Source:
Members
consecutiveErrors :number
Keeps track of the number of consecutive errors in-order to determine what to do next base don the set options.
Type:
- number
- Source:
dynamicDNS :DEDA-Google-DDNS.DynamicDNS
An instance of the Google DynamicDNS class used within this service.
Type:
- Source:
options :DEDA-Google-DDNS.Service.DefaultOptions
The class options as defined by getDefaultOptions() On initialization the constructor options parameters are merged with the default options.
Type:
- Source:
Methods
(static) getDefaultOptions() → {DEDA-Google-DDNS.Service.DefaultOptions}
Returns a list of all possible options for this class with their default values.
- Source:
Returns:
Returns the component default options.
log(message, type)
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
message |
* | ||
type |
* | log |
- Source:
(async) start()
Starts the service check loop that will check for public IP changes every set time interval to ensure it remains synchronized with the host name DNS IP address.
- Source:
Type Definitions
DefaultOptions
Type:
- Object
Properties:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
checkInterval |
number |
<optional> |
60 | The amount of time in seconds to wait before checking if the public IP has changed. |
maxConsecutiveErrors |
number |
<optional> |
10 | The maximum number of check consecutive errors before stopping the check timer loop. |
exitOnMaxErrors |
boolean |
<optional> |
true | Defines whether to exit process when the max consecutive errors has been reached. |
logPath |
string | boolean |
<optional> |
'./logs.log' | Defines the log output path. Set to false to disable output logs. |
logToConsole |
boolean |
<optional> |
true | Defines whether to log output to the console or not. |
- Source: