Documentation
¶
Overview ¶
Package admission defines the Admission interface for connection admission control, determining whether to allow or deny incoming connections.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Admission ¶
type Admission interface {
// Admit reports whether the connection to the given network address is allowed.
// It returns true if the connection is permitted.
Admit(ctx context.Context, network, addr string, opts ...Option) bool
}
Admission is the admission control interface. It decides whether a connection to the given address should be allowed or denied. Common implementations include IP whitelist/blacklist and domain-based rules.
type Option ¶
type Option func(opts *Options)
Option is a functional option for configuring Options.
func WithNetwork ¶ added in v0.6.1
WithNetwork sets the network type.
func WithService ¶ added in v0.6.1
WithService sets the service name.