hostclassifier

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HostClassifier

type HostClassifier struct {
	// contains filtered or unexported fields
}

HostClassifier decides whether a host should be treated as private. Private hosts are routed by Harpoon.

func NewHostClassifier

func NewHostClassifier(cfg config.HarpoonHostClassifierConfig) *HostClassifier

NewHostClassifier builds a classifier from Harpoon config.

func (*HostClassifier) IsPrivateHost

func (c *HostClassifier) IsPrivateHost(host string) (bool, string)

IsPrivateHost reports whether the host should be treated as private along with the match reason.

func (*HostClassifier) IsPrivateURL

func (c *HostClassifier) IsPrivateURL(u *url.URL) (bool, string)

IsPrivateURL reports whether the URL host should be treated as private.

Jump to

Keyboard shortcuts

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