domain

package
v0.3.1-rc.7 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Domain

type Domain[T any] struct {
	Root         *domainNode[T] `json:"root"`          // for example.com, example.*
	WildcardRoot *domainNode[T] `json:"wildcard_root"` // for *.example.com, *.example.*
	// contains filtered or unexported fields
}

func NewDomainMapper

func NewDomainMapper[T any]() *Domain[T]

func (*Domain[T]) Clear

func (d *Domain[T]) Clear() error

func (*Domain[T]) Insert

func (d *Domain[T]) Insert(domain string, mark T)

func (*Domain[T]) Marshal

func (d *Domain[T]) Marshal() ([]byte, error)

func (*Domain[T]) Search

func (d *Domain[T]) Search(domain proxy.Address) (mark T, ok bool)

Jump to

Keyboard shortcuts

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