bootstrap

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2023 License: GPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StrategyIPv4Prefer = "ipv4-prefer"
	StrategyIPv6Prefer = "ipv6-prefer"
	StrategyIPv4Only   = "ipv4-only"
	StrategyIPv6Only   = "ipv6-only"
)
View Source
const DefaultCacheTTL = 300 * time.Second

Variables

This section is empty.

Functions

This section is empty.

Types

type Bootstrap

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

func NewBootstrap

func NewBootstrap(ctx context.Context, core adapter.Core, options Options) (*Bootstrap, error)

func (*Bootstrap) Close

func (b *Bootstrap) Close()

func (*Bootstrap) Lookup

func (b *Bootstrap) Lookup(ctx context.Context, domain string) ([]netip.Addr, error)

func (*Bootstrap) Start

func (b *Bootstrap) Start() error

func (*Bootstrap) UpstreamTag

func (b *Bootstrap) UpstreamTag() string

type Options

type Options struct {
	Upstream string         `yaml:"upstream"`
	Strategy string         `yaml:"strategy,omitempty"`
	CacheTTL utils.Duration `yaml:"cache-ttl,omitempty"`
}

Jump to

Keyboard shortcuts

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