Help us shape the future of Go! Take the 2026 Go Developer Survey

cachefile

package
v1.14.4 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: GPL-2.0 Imports: 20 Imported by: 23

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheFile

type CacheFile struct {
	DB *bbolt.DB
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, logger logger.Logger, options option.CacheFileOptions) *CacheFile

func (*CacheFile) CacheID added in v1.14.0

func (c *CacheFile) CacheID() string

func (*CacheFile) ClearDNSCache added in v1.14.0

func (c *CacheFile) ClearDNSCache() error

func (*CacheFile) Dependencies added in v1.11.0

func (c *CacheFile) Dependencies() []string

func (*CacheFile) FakeIPLoad

func (c *CacheFile) FakeIPLoad(address netip.Addr) (string, bool)

func (*CacheFile) FakeIPLoadDomain

func (c *CacheFile) FakeIPLoadDomain(domain string, isIPv6 bool) (netip.Addr, bool)

func (*CacheFile) FakeIPMetadata

func (c *CacheFile) FakeIPMetadata() *adapter.FakeIPMetadata

func (*CacheFile) FakeIPReset

func (c *CacheFile) FakeIPReset() error

func (*CacheFile) FakeIPSaveMetadata

func (c *CacheFile) FakeIPSaveMetadata(metadata *adapter.FakeIPMetadata) error

func (*CacheFile) FakeIPSaveMetadataAsync

func (c *CacheFile) FakeIPSaveMetadataAsync(metadata *adapter.FakeIPMetadata)

func (*CacheFile) FakeIPStore

func (c *CacheFile) FakeIPStore(address netip.Addr, domain string) error

func (*CacheFile) FakeIPStoreAsync

func (c *CacheFile) FakeIPStoreAsync(address netip.Addr, domain string, logger logger.Logger)

func (*CacheFile) LoadDNSCache added in v1.14.0

func (c *CacheFile) LoadDNSCache(transportName string, qName string, qType uint16) (rawMessage []byte, expireAt time.Time, loaded bool)

func (*CacheFile) LoadGroupExpand

func (c *CacheFile) LoadGroupExpand(group string) (isExpand bool, loaded bool)

func (*CacheFile) LoadMode

func (c *CacheFile) LoadMode() string

func (*CacheFile) LoadRDRC added in v1.8.12

func (c *CacheFile) LoadRDRC(transportName string, qName string, qType uint16) (rejected bool)

func (*CacheFile) LoadRuleSet

func (c *CacheFile) LoadRuleSet(tag string) *adapter.SavedBinary

func (*CacheFile) LoadSelected

func (c *CacheFile) LoadSelected(group string) string

func (*CacheFile) Name added in v1.11.0

func (c *CacheFile) Name() string

func (*CacheFile) RDRCTimeout added in v1.8.12

func (c *CacheFile) RDRCTimeout() time.Duration

func (*CacheFile) SaveDNSCache added in v1.14.0

func (c *CacheFile) SaveDNSCache(transportName string, qName string, qType uint16, rawMessage []byte, expireAt time.Time) error

func (*CacheFile) SaveDNSCacheAsync added in v1.14.0

func (c *CacheFile) SaveDNSCacheAsync(transportName string, qName string, qType uint16, rawMessage []byte, expireAt time.Time, logger logger.Logger)

func (*CacheFile) SaveRDRC added in v1.8.12

func (c *CacheFile) SaveRDRC(transportName string, qName string, qType uint16) error

func (*CacheFile) SaveRDRCAsync added in v1.8.12

func (c *CacheFile) SaveRDRCAsync(transportName string, qName string, qType uint16, logger logger.Logger)

func (*CacheFile) SaveRuleSet

func (c *CacheFile) SaveRuleSet(tag string, set *adapter.SavedBinary) error

func (*CacheFile) SetDisableExpire added in v1.14.0

func (c *CacheFile) SetDisableExpire(disableExpire bool)

func (*CacheFile) SetOptimisticTimeout added in v1.14.0

func (c *CacheFile) SetOptimisticTimeout(timeout time.Duration)

func (*CacheFile) Start

func (c *CacheFile) Start(stage adapter.StartStage, scope *adapter.Scope) error

func (*CacheFile) StoreDNS added in v1.14.0

func (c *CacheFile) StoreDNS() bool

func (*CacheFile) StoreFakeIP

func (c *CacheFile) StoreFakeIP() bool

func (*CacheFile) StoreGroupExpand

func (c *CacheFile) StoreGroupExpand(group string, isExpand bool) error

func (*CacheFile) StoreMode

func (c *CacheFile) StoreMode(mode string) error

func (*CacheFile) StoreRDRC added in v1.8.12

func (c *CacheFile) StoreRDRC() bool

func (*CacheFile) StoreSelected

func (c *CacheFile) StoreSelected(group, selected string) error

Jump to

Keyboard shortcuts

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