resolver

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cachefeeder

type Cachefeeder struct {
	// contains filtered or unexported fields
}

Cachefeeder is in charge to feed a cache based on the answer of a resolver

func NewCacheFeeder

func NewCacheFeeder(delegate Resolver, cache cache.Feedable) *Cachefeeder

func (*Cachefeeder) Name

func (r *Cachefeeder) Name() string

Name implements Resolver

func (*Cachefeeder) Resolve

func (r *Cachefeeder) Resolve(question dto.Question) (dto.Record, bool)

Resolve implements Resolver

type ClientResolver

type ClientResolver struct {
	// contains filtered or unexported fields
}

ClientResolver is a resolver who delegates to a dns client interface

func NewClientresolver

func NewClientresolver(c client.Client, name string) *ClientResolver

func (*ClientResolver) Name

func (resolver *ClientResolver) Name() string

Name implements Resolver

func (*ClientResolver) Resolve

func (resolver *ClientResolver) Resolve(question dto.Question) (dto.Record, bool)

Resolve implements Resolver Use the client to get the records

type Resolver

type Resolver interface {
	Resolve(dto.Question) (dto.Record, bool)
	Name() string
}

type ResolverChain

type ResolverChain struct {
	// contains filtered or unexported fields
}

ResolverChain is in charge to ask all subresolver if they know the answer to the every question in the dns message

func NewResolverChain

func NewResolverChain(chain []Resolver) *ResolverChain

func (*ResolverChain) Resolve

func (resolverChain *ResolverChain) Resolve(message dto.Message) dto.Message

Jump to

Keyboard shortcuts

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