dnscache

package
v0.0.0-...-ef8be33 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InvalidNode nodeType = iota
	DNS
	IP
)
View Source
const (
	DefaultCacheSize = 5000 // default size for maximum query roots in the cache (more nodes are possible)
)

Variables

View Source
var ErrDNSRecordExpired = errors.New("dns record expired")
View Source
var ErrDNSRecordNotFound = errors.New("no such dns record")
View Source
var ErrDataNotFound = errors.New("requested data was not found")
View Source
var ErrKeyNotSupported = errors.New("queried key is not supported")

Functions

This section is empty.

Types

type Config

type Config struct {
	CacheSize int
	Enable    bool
}

type DNSCache

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

func New

func New(config Config) (*DNSCache, error)

func (*DNSCache) Add

func (nc *DNSCache) Add(event *trace.Event) error

func (*DNSCache) Get

func (nc *DNSCache) Get(key string) (cacheQuery, error)

Get returns all parent and child DNS records relative to the given record value. Note, that the query does not traverse the tree downwards from the parent nodes.

type DNSDatasource

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

func NewDataSource

func NewDataSource(d *DNSCache) *DNSDatasource

func (DNSDatasource) Get

func (ctx DNSDatasource) Get(key interface{}) (map[string]interface{}, error)

func (DNSDatasource) ID

func (ctx DNSDatasource) ID() string

func (DNSDatasource) Keys

func (ctx DNSDatasource) Keys() []string

func (DNSDatasource) Namespace

func (ctx DNSDatasource) Namespace() string

func (DNSDatasource) Schema

func (ctx DNSDatasource) Schema() string

func (DNSDatasource) Version

func (ctx DNSDatasource) Version() uint

Jump to

Keyboard shortcuts

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