dnsd

package
v0.0.0-...-7249c1f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2020 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const PluginName string = "big-gorilla"

PluginName is the name of this plugin

View Source
const TopicName string = "AddRequest"

TopicName defines which NSQ topic requests will be published to

Variables

PluginLogger is used to log messages from the plugin to CoreDNS

View Source
var PluginProducer *nsq.Producer = nil

PluginProducer is the NSQ producer

Functions

func Publish

func Publish(request Request) error

Publish will publish the request to NSQ

Types

type PluginHandler

type PluginHandler struct {
	plugin.Handler
}

PluginHandler will handle incoming DNS requests

func (PluginHandler) Name

func (handler PluginHandler) Name() string

Name will return the plugin's name

func (PluginHandler) ServeDNS

func (handler PluginHandler) ServeDNS(context context.Context, responseWriter dns.ResponseWriter, message *dns.Msg) (int, error)

ServeDNS will handle each DNS request

type Request

type Request struct {
	Hash    string `json:"hash"`
	Time    int64  `json:"time"`
	Address string `json:"address"`
	Name    string `json:"name"`
	Type    uint16 `json:"type"`
	Class   uint16 `json:"class"`
}

Request defines a DNS request object

func CreateRequest

func CreateRequest(responseWriter dns.ResponseWriter, question dns.Question) Request

CreateRequest will create a new request object

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL