Documentation ¶
Index ¶
- Variables
- func NewAcceptError(err error) error
- type AcceptError
- type Listener
- type Option
- func AddrOption(addr string) Option
- func AdmissionOption(admission admission.Admission) Option
- func AuthOption(auth *url.Userinfo) Option
- func AutherOption(auther auth.Authenticator) Option
- func ConnLimiterOption(limiter conn.ConnLimiter) Option
- func LoggerOption(logger logger.Logger) Option
- func NetnsOption(netns string) Option
- func ProxyProtocolOption(ppv int) Option
- func RouterOption(router chain.Router) Option
- func ServiceOption(service string) Option
- func StatsOption(stats *stats.Stats) Option
- func TLSConfigOption(tlsConfig *tls.Config) Option
- func TrafficLimiterOption(limiter traffic.TrafficLimiter) Option
- type Options
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrClosed = errors.New("accpet on closed listener")
)
Functions ¶
func NewAcceptError ¶
Types ¶
type AcceptError ¶
type AcceptError struct {
// contains filtered or unexported fields
}
func (*AcceptError) Error ¶
func (e *AcceptError) Error() string
func (*AcceptError) Temporary ¶
func (e *AcceptError) Temporary() bool
func (*AcceptError) Timeout ¶
func (e *AcceptError) Timeout() bool
func (*AcceptError) Unwrap ¶
func (e *AcceptError) Unwrap() error
type Listener ¶
type Listener interface { Init(metadata.Metadata) error Accept() (net.Conn, error) Addr() net.Addr Close() error }
Listener is a server listener, just like a net.Listener.
type Option ¶
type Option func(opts *Options)
func AddrOption ¶
func AdmissionOption ¶
func AuthOption ¶
func AutherOption ¶
func AutherOption(auther auth.Authenticator) Option
func ConnLimiterOption ¶
func ConnLimiterOption(limiter conn.ConnLimiter) Option
func LoggerOption ¶
func NetnsOption ¶
func ProxyProtocolOption ¶
func RouterOption ¶
func ServiceOption ¶
func StatsOption ¶
func TLSConfigOption ¶
func TrafficLimiterOption ¶
func TrafficLimiterOption(limiter traffic.TrafficLimiter) Option
type Options ¶
type Options struct { Addr string Auther auth.Authenticator Auth *url.Userinfo TLSConfig *tls.Config Admission admission.Admission TrafficLimiter traffic.TrafficLimiter ConnLimiter conn.ConnLimiter Chain chain.Chainer Stats *stats.Stats Logger logger.Logger Service string ProxyProtocol int Netns string Router chain.Router }
Click to show internal directories.
Click to hide internal directories.