Documentation
¶
Index ¶
- Constants
- Variables
- func ResolveEndpoints(ctx context.Context, hostports []string, hosts *Hosts) ([]netip.AddrPort, error)
- type Dialer
- type Error
- type Hosts
- type Policy
- func (p *Policy) AddProtectedEndpoints(id string, addrs []netip.AddrPort)
- func (p *Policy) Allow() []string
- func (p *Policy) AllowsAny(addr netip.Addr) bool
- func (p *Policy) Check(addr netip.Addr, port uint16) error
- func (p *Policy) Deny() []string
- func (p *Policy) Filter(addrs []netip.Addr) []netip.Addr
- func (p *Policy) ProtectBrowser(ctx context.Context, id string, hostports []string, hosts *Hosts) error
- func (p *Policy) ProtectEndpoints(id string, addrs []netip.AddrPort)
- func (p *Policy) ProtectPort(port uint16)
- func (p *Policy) ProtectedEndpoints(id string) []netip.AddrPort
- func (p *Policy) RefreshBrowser(ctx context.Context, id string, hostports []string, hosts *Hosts) error
- func (p *Policy) Summary() string
- func (p *Policy) With(allow, deny []Rule) *Policy
- type Resolver
- type Rule
- type Rules
Constants ¶
View Source
const ConnectTimeout = 30 * time.Second
View Source
const Errno = "EACCES"
Variables ¶
View Source
var ErrDenied = errors.New("denied by policy")
Functions ¶
Types ¶
type Policy ¶
type Policy struct {
// contains filtered or unexported fields
}
func (*Policy) AddProtectedEndpoints ¶ added in v1.17.3
func (*Policy) ProtectBrowser ¶ added in v1.17.2
func (*Policy) ProtectEndpoints ¶ added in v1.17.2
func (*Policy) ProtectPort ¶ added in v1.39.0
func (*Policy) ProtectedEndpoints ¶ added in v1.17.2
func (*Policy) RefreshBrowser ¶ added in v1.17.3
type Resolver ¶
func NewResolver ¶
Click to show internal directories.
Click to hide internal directories.