summaryrefslogtreecommitdiff
path: root/lib/powerdnsex/config.ex
diff options
context:
space:
mode:
Diffstat (limited to 'lib/powerdnsex/config.ex')
-rw-r--r--lib/powerdnsex/config.ex5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/powerdnsex/config.ex b/lib/powerdnsex/config.ex
index 34d5889..1302524 100644
--- a/lib/powerdnsex/config.ex
+++ b/lib/powerdnsex/config.ex
@@ -1,6 +1,7 @@
defmodule PowerDNSex.Config do
defstruct url: "",
- token: ""
+ token: "",
+ timeout: "60"
alias PowerDNSex.Config
@@ -20,6 +21,8 @@ defmodule PowerDNSex.Config do
def powerdns_token, do: data().token
+ def powerdns_timeout, do: :timer.seconds(data().timeout)
+
def valid?(), do: powerdns_url() && powerdns_token()
###