hostmatch

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2026 License: BSD-3-Clause, GPL-3.0, MIT, + 1 more Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HostMatcher

type HostMatcher[T comparable] struct {
	// contains filtered or unexported fields
}

HostMatcher matches rules against hostnames, supporting wildcards and exceptions. It is safe for concurrent use.

func NewHostMatcher

func NewHostMatcher[T comparable]() *HostMatcher[T]

func (*HostMatcher[T]) AddExceptionRule

func (hm *HostMatcher[T]) AddExceptionRule(hostnamePatterns string, data T) error

func (*HostMatcher[T]) AddPrimaryRule

func (hm *HostMatcher[T]) AddPrimaryRule(hostnamePatterns string, data T) error

func (*HostMatcher[T]) Get

func (hm *HostMatcher[T]) Get(hostname string) []T

Jump to

Keyboard shortcuts

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