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.
Click to show internal directories.
Click to hide internal directories.