upstream

package
v0.10.6 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TypeString added in v0.10.0

func TypeString(typ RType) string

Types

type RType

type RType = uint16

type RValue

type RValue any

type Rule

type Rule struct {
	Name     string
	Type     RType
	Value    RValue
	ValueStr string
}

func NewRule added in v0.10.0

func NewRule(name string, typ RType, content string) (Rule, error)

func RuleFromRR

func RuleFromRR(rr dns.RR) (Rule, error)

func (*Rule) RR

func (r *Rule) RR() (dns.RR, error)

func (*Rule) Same added in v0.10.0

func (r *Rule) Same(other *Rule) bool

type Tx

type Tx interface {
	Delete(r Rule) error
	Append(r Rule) error
	Commit(ctx context.Context) error
	Close()
}

type Upstream

type Upstream interface {
	Tx(ctx context.Context) (Tx, error)
	Query(ctx context.Context, q Rule) ([]Rule, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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