Documentation ¶
Index ¶
- Variables
- func CreateDirectListener(Context context.Context, URL *url.URL, config *ListenerConfig) (net.Listener, []url.URL, error)
- type DynamicAddressGetter
- type ListenerConfig
- type MultiLis
- func (l *MultiLis) Accept() (net.Conn, error)
- func (l *MultiLis) Addr() net.Addr
- func (l *MultiLis) Close() error
- func (l *MultiLis) RegisterChannel(channel string, discoveryDialer func() (net.Conn, error))
- func (l *MultiLis) RegisterListener(alias string, listenerCreator func() (net.Listener, []url.URL, error), ...)
- func (l *MultiLis) URLs() []url.URL
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // The probing interval for publisher to check the publish status. // This is required in case discovery server does not send close signal. DiscoveryClientPingInterval = time.Minute // The dynamic address detection cycle. // MultiListener will close the listener whose associated urls are changed. DynamicAddressStateMonitorInterval = time.Minute ErrNoListenerConfigured = fmt.Errorf("url must contain port= or relay=1 field") SessionMinRetryDuration = time.Second SessionMaxRetryDuration = time.Minute )
Functions ¶
func CreateDirectListener ¶
func CreateDirectListener(Context context.Context, URL *url.URL, config *ListenerConfig) (net.Listener, []url.URL, error)
RegisterURLListener creates a listener on the given URL. This URL can only be TCP or UDP for direct access cases. Append query `enc=1` for e2e encryption (Only works on TCP).
Types ¶
type ListenerConfig ¶
Click to show internal directories.
Click to hide internal directories.