gen

package
v0.0.0-...-c1021f5 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2017 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidGenerator = errors.New("invalid generator name")

Functions

This section is empty.

Types

type Generator

type Generator interface {
	// generate reuturns an entry between a hostname its destination IP/hostname.
	// When no more pairs are available, generate should return an empty rawentry
	Generate() (*RawEntry, error)
}

func MakeGenerator

func MakeGenerator(name string, conf *cfg.Config) (Generator, error)

type RawEntry

type RawEntry struct {
	Source, Target string
}

RawEntry is a pair of source and target addresses or domains to be resolved by the DNS server.

func EmptyRawEntry

func EmptyRawEntry() *RawEntry

EmptyRawEntry allocates an empty raw entry.

func NewRawEntry

func NewRawEntry(s, t string) *RawEntry

MakeRawEntry allocates a raw entry for source s and target t.

Jump to

Keyboard shortcuts

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