Documentation ¶
Index ¶
- type CassandraDB
- func (c *CassandraDB) ConnectDB(ips []string)
- func (c *CassandraDB) Disconnect()
- func (c *CassandraDB) Handle(w dns.ResponseWriter, r *dns.Msg)
- func (c *CassandraDB) HandleFile(location string, replace bool)
- func (c *CassandraDB) MakeQuery(m *dns.Msg) int
- func (c *CassandraDB) UploadRR(line string) error
- type DBDriver
- type EtcdDB
- type RedisKVS
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CassandraDB ¶
type CassandraDB struct { Print bool // contains filtered or unexported fields }
CassandraDB : Implements DBDriver and holds the cassandra session
func (*CassandraDB) ConnectDB ¶
func (c *CassandraDB) ConnectDB(ips []string)
ConnectDB : Starts a cassandra session to a cluster given the ips. If it fails it dies
func (*CassandraDB) Disconnect ¶
func (c *CassandraDB) Disconnect()
Disconnect : ends the cassandra session
func (*CassandraDB) Handle ¶
func (c *CassandraDB) Handle(w dns.ResponseWriter, r *dns.Msg)
Handle : function to call on the dns server when a package is received. Prepares the package and calls Cassandra to fill it up
func (*CassandraDB) HandleFile ¶
func (c *CassandraDB) HandleFile(location string, replace bool)
HandleFile reads a file containing RRs a uploads them replacing if set
func (*CassandraDB) MakeQuery ¶
func (c *CassandraDB) MakeQuery(m *dns.Msg) int
MakeQuery : using a valid session stored on CassandraDB makes a get query to the desired database
func (*CassandraDB) UploadRR ¶
func (c *CassandraDB) UploadRR(line string) error
UploadRR to Cassandra Cluster from line
type DBDriver ¶
type DBDriver interface { MakeQuery(m *dns.Msg) int UploadRR(line string) error HandleFile(location string, replace bool) ConnectDB(ips []string) Disconnect() Handle(w dns.ResponseWriter, r *dns.Msg) }
DBDriver : Database driver interface
type EtcdDB ¶
EtcdDB : Implements DBDriver and holds the etcd client
func (*EtcdDB) Handle ¶
func (edb *EtcdDB) Handle(w dns.ResponseWriter, r *dns.Msg)
Handle : function to call on the dns server when a package is received. Prepares the package and calls Etcd to fill it up
func (*EtcdDB) HandleFile ¶
HandleFile reads a file containing RRs a uploads them replacing if set
type RedisKVS ¶
type RedisKVS struct { Print bool // contains filtered or unexported fields }
RedisKVS : Implements DBDriver and holds the redis cluster client
func (*RedisKVS) Handle ¶
func (r *RedisKVS) Handle(w dns.ResponseWriter, req *dns.Msg)
Handle : function to call on the dns server when a package is received. Prepares the package and calls Redis to fill it up
func (*RedisKVS) HandleFile ¶
HandleFile reads a file containing RRs a uploads them replacing if set