Documentation ¶
Index ¶
- Variables
- func NewAcceptError(err error) error
- type AcceptError
- type IListener
- type NewListener
- type Option
- func AddrOption(addr string) Option
- func AdmissionOption(admission admission.IAdmission) Option
- func AuthOption(auth *url.Userinfo) Option
- func AutherOption(auther auth.IAuthenticator) Option
- func ChainOption(chain chain.IChainer) Option
- func ConnLimiterOption(limiter conn.IConnLimiter) Option
- func LoggerOption(logger logger.ILogger) Option
- func ProxyProtocolOption(ppv int) Option
- func ServiceOption(service string) Option
- func StatsOption(stats *stats.Stats) Option
- func TLSConfigOption(tlsConfig *tls.Config) Option
- func TrafficLimiterOption(limiter traffic.ITrafficLimiter) Option
- type Options
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrClosed = errors.New("accept 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 IListener ¶
type IListener interface { Init(metadata.IMetaData) error Accept() (net.Conn, error) Addr() net.Addr Close() error }
IListener is a server listener, just like a net.Listener.
type NewListener ¶
type Option ¶
type Option func(opts *Options)
func AddrOption ¶
func AdmissionOption ¶
func AdmissionOption(admission admission.IAdmission) Option
func AuthOption ¶
func AutherOption ¶
func AutherOption(auther auth.IAuthenticator) Option
func ChainOption ¶
func ConnLimiterOption ¶
func ConnLimiterOption(limiter conn.IConnLimiter) Option
func LoggerOption ¶
func ProxyProtocolOption ¶
func ServiceOption ¶
func StatsOption ¶ added in v0.0.2
func TLSConfigOption ¶
func TrafficLimiterOption ¶
func TrafficLimiterOption(limiter traffic.ITrafficLimiter) Option
Click to show internal directories.
Click to hide internal directories.