type ListenerOptions … func newListenOpts(opts ...ListenerOption) *ListenerOptions { … } func (lo *ListenerOptions) applyOpts(opts []ListenerOption) { … } // IsTimeout returns true if the listener has a read/write timeout defined. func (lo *ListenerOptions) IsTimeout() bool { … } // IsSocketOpts returns true if the listener options includes socket options. func (lo *ListenerOptions) IsSocketOpts() bool { … } // IsTLS returns true if listner options includes TLSInfo. func (lo *ListenerOptions) IsTLS() bool { … } type ListenerOption … // WithTimeout allows for a read or write timeout to be applied to the listener. func WithTimeout(read, write time.Duration) ListenerOption { … } // WithSocketOpts defines socket options that will be applied to the listener. func WithSocketOpts(s *SocketOpts) ListenerOption { … } // WithTLSInfo adds TLS credentials to the listener. func WithTLSInfo(t *TLSInfo) ListenerOption { … } // WithSkipTLSInfoCheck when true a transport can be created with an https scheme // without passing TLSInfo, circumventing not presented error. Skipping this check // also requires that TLSInfo is not passed. func WithSkipTLSInfoCheck(skip bool) ListenerOption { … }