Documentation
¶
Index ¶
- type Cache
- type CacheCfg
- type FileSource
- type FileSourceOption
- type Route
- type RouteOption
- func WithBannedQTypes(types ...uint16) RouteOption
- func WithRouteCache(cfg CacheCfg) RouteOption
- func WithRouteDNS64(d64 *dns64.DNS64) RouteOption
- func WithRouteFinalize(finalize bool) RouteOption
- func WithRouteName(name string) RouteOption
- func WithRouteSource(sources ...Source) RouteOption
- func WithRouteUpstreams(upstreams ...upstream.Upstream) RouteOption
- type RouteSubscribeFn
- type RouteTrie
- type Router
- type Source
- type StaticSource
- type TrieNode
- type WatchNotifier
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileSource ¶
type FileSource struct {
// contains filtered or unexported fields
}
func NewFileSource ¶
func NewFileSource(filepath string, opts ...FileSourceOption) (*FileSource, error)
func (*FileSource) Close ¶
func (s *FileSource) Close() error
func (*FileSource) Watch ¶
func (s *FileSource) Watch(notify WatchNotifier)
type FileSourceOption ¶
type FileSourceOption func(s *FileSource)
func WithFileSourceReloadInterval ¶
func WithFileSourceReloadInterval(interval time.Duration) FileSourceOption
type Route ¶
type Route struct {
// contains filtered or unexported fields
}
func NewRoute ¶
func NewRoute(opts ...RouteOption) *Route
func (*Route) Subscribe ¶
func (r *Route) Subscribe(fn RouteSubscribeFn)
type RouteOption ¶
type RouteOption func(r *Route)
func WithBannedQTypes ¶ added in v2.1.0
func WithBannedQTypes(types ...uint16) RouteOption
func WithRouteCache ¶
func WithRouteCache(cfg CacheCfg) RouteOption
func WithRouteDNS64 ¶
func WithRouteDNS64(d64 *dns64.DNS64) RouteOption
func WithRouteFinalize ¶
func WithRouteFinalize(finalize bool) RouteOption
func WithRouteName ¶
func WithRouteName(name string) RouteOption
func WithRouteSource ¶
func WithRouteSource(sources ...Source) RouteOption
func WithRouteUpstreams ¶
func WithRouteUpstreams(upstreams ...upstream.Upstream) RouteOption
type RouteSubscribeFn ¶
type RouteSubscribeFn func(routeName string)
type RouteTrie ¶
type RouteTrie struct {
// contains filtered or unexported fields
}
func NewRouteTrie ¶
func NewRouteTrie() *RouteTrie
type StaticSource ¶
type StaticSource struct {
// contains filtered or unexported fields
}
func NewStaticSource ¶
func NewStaticSource(domains []string) (*StaticSource, error)
func (*StaticSource) Close ¶
func (s *StaticSource) Close() error
func (*StaticSource) Watch ¶
func (s *StaticSource) Watch(_ WatchNotifier)
type WatchNotifier ¶
type WatchNotifier func()
Click to show internal directories.
Click to hide internal directories.