dnscom

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Server

func Server(ip net.IP, returnIP net.IP, plug Plugin)

Server Main DNS COM Server

Types

type DefaultPlugin

type DefaultPlugin struct {
}

DefaultPlugin holds the Default plugin data.

var DNSCOMPlugin DefaultPlugin

func (*DefaultPlugin) Clean

func (p *DefaultPlugin) Clean()

Clean cleanup the plugin

func (*DefaultPlugin) Err

func (p *DefaultPlugin) Err(a string, b error)

Err call in case of an error.

func (*DefaultPlugin) Init

func (p *DefaultPlugin) Init() error

Init init the plugin.

func (*DefaultPlugin) Name

func (p *DefaultPlugin) Name() string

func (*DefaultPlugin) Ok

func (p *DefaultPlugin) Ok(host string, a string)

Ok call in case of a function

type Plugin

type Plugin interface {
	Init() error
	Clean()
	Err(data string, err error)
	Ok(host string, data string)
	Name() string
}

Plugin methods that needs to be implemented on the plugins

func LoadPlugin

func LoadPlugin(plug string) (Plugin, error)

LoadPlugin if something went wrong error will be filled.

Jump to

Keyboard shortcuts

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