fakeip

package
v1.10.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2024 License: GPL-2.0 Imports: 10 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MemoryStorage

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

func NewMemoryStorage

func NewMemoryStorage() *MemoryStorage

func (*MemoryStorage) FakeIPLoad

func (s *MemoryStorage) FakeIPLoad(address netip.Addr) (string, bool)

func (*MemoryStorage) FakeIPLoadDomain added in v1.3.3

func (s *MemoryStorage) FakeIPLoadDomain(domain string, isIPv6 bool) (netip.Addr, bool)

func (*MemoryStorage) FakeIPMetadata

func (s *MemoryStorage) FakeIPMetadata() *adapter.FakeIPMetadata

func (*MemoryStorage) FakeIPReset

func (s *MemoryStorage) FakeIPReset() error

func (*MemoryStorage) FakeIPSaveMetadata

func (s *MemoryStorage) FakeIPSaveMetadata(metadata *adapter.FakeIPMetadata) error

func (*MemoryStorage) FakeIPSaveMetadataAsync added in v1.4.0

func (s *MemoryStorage) FakeIPSaveMetadataAsync(metadata *adapter.FakeIPMetadata)

func (*MemoryStorage) FakeIPStore

func (s *MemoryStorage) FakeIPStore(address netip.Addr, domain string) error

func (*MemoryStorage) FakeIPStoreAsync added in v1.3.3

func (s *MemoryStorage) FakeIPStoreAsync(address netip.Addr, domain string, logger logger.Logger)

type Store

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

func NewStore

func NewStore(ctx context.Context, logger logger.Logger, inet4Range netip.Prefix, inet6Range netip.Prefix) *Store

func (*Store) Close

func (s *Store) Close() error

func (*Store) Contains

func (s *Store) Contains(address netip.Addr) bool

func (*Store) Create

func (s *Store) Create(domain string, isIPv6 bool) (netip.Addr, error)

func (*Store) Lookup

func (s *Store) Lookup(address netip.Addr) (string, bool)

func (*Store) Reset

func (s *Store) Reset() error

func (*Store) Start

func (s *Store) Start() error

type Transport

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

func NewTransport

func NewTransport(options dns.TransportOptions) (*Transport, error)

func (*Transport) Close

func (s *Transport) Close() error

func (*Transport) Exchange

func (s *Transport) Exchange(ctx context.Context, message *mDNS.Msg) (*mDNS.Msg, error)

func (*Transport) Lookup

func (s *Transport) Lookup(ctx context.Context, domain string, strategy dns.DomainStrategy) ([]netip.Addr, error)

func (*Transport) Name

func (s *Transport) Name() string

func (*Transport) Raw

func (s *Transport) Raw() bool

func (*Transport) Reset added in v1.4.0

func (s *Transport) Reset()

func (*Transport) Start

func (s *Transport) Start() error

func (*Transport) Store

func (s *Transport) Store() adapter.FakeIPStore

Jump to

Keyboard shortcuts

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