/*
NewExportedTLSPort opens a new anonymous port on "ip" and export it through
etcd as "servicename" (see NewExportedPort). Associates the TLS configuration
"config". If "ip" is a host:port pair, the port will be overridden.
*/
NewExportedTLSPort opens a new anonymous port on "ip" and export it through
etcd as "servicename" . Associates the TLS configuration
"config". If "ip" is a host:port pair, the port will be overridden.
/ * NewExportedTLSPort opens a new anonymous port on " ip " and export it through etcd as " servicename " ( see NewExportedPort ) . Associates the TLS configuration " config " . If " ip " is a host : port pair the port will be overridden . * /
func (e *ServiceExporter) NewExportedTLSPort(
	ctx context.Context, network, ip, servicename string,
	config *tls.Config) (net.Listener, error) {
	var l net.Listener
	var err error
	if l, err = e.NewExportedPort(ctx, network, ip, servicename); err != nil {
		return nil, err
	}
	return tls.NewListener(l, config), nil
}
func ( e * ServiceExporter ) NewExportedTLSPort ( ctx context . Context , network , ip , servicename string , config * tls . Config ) ( net . Listener , error ) { var l net . Listener var err error if l , err = e . NewExportedPort ( ctx , network , ip , servicename ) ; err != nil { return nil , err } return tls . NewListener ( l , config ) , nil }
NewExportedTLSPort opens a new anonymous port on "ip" and export it through
etcd as "servicename" .
NewExportedTLSPort opens a new anonymous port on " ip " and export it through etcd as " servicename " .
// We can just create a new port as above... // ... and inject a TLS context.