Sha256: f32fa197877d16c2cbb3e6a6107b5412d4dec073ca035a18d9bf971db3005004
Contents?: true
Size: 683 Bytes
Versions: 3
Compression:
Stored size: 683 Bytes
Contents
# frozen_string_literal: true require "base64" require "json" require "logger" class CoreDns::Etcd attr_reader :api_url, :prefix, :postfix def initialize(url = nil) @logger = Logger.new($stdout) initialize_params @api_url = "http://#{url}:#{@port}/#{@version}" @endpoint = url end def domain(hostname) CoreDns::Etcd::Domain.new(self, hostname) end def zone(hostname) CoreDns::Etcd::DnsZone.new(self, hostname) end private def initialize_params @prefix = ENV["COREDNS_PREFIX"] || "skydns" @postfix = ENV["COREDNS_POSTFIX"] || "x" @port = ENV["COREDNS_PORT"] || 2379 @version = ENV["COREDNS_VERSION"] || "v3" end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
coredns-1.0.2 | lib/etcd.rb |
coredns-1.0.1 | lib/etcd.rb |
coredns-1.0 | lib/etcd.rb |