Documentation
¶
Overview ¶
*
- Exported named Doozer HTTP service.
- Creates an HTTP server and exports it to Doozer.
*
- Exported named Doozer port.
- This binds to an anonymous port, exports the host:port pair through Doozer
- and returns the port to the caller.
Index ¶
- type ServiceExporter
- func (self *ServiceExporter) ListenAndServeNamedHTTP(servicename, addr string, handler http.Handler) error
- func (self *ServiceExporter) NewExportedPort(network, ip, servicename string) (net.Listener, error)
- func (self *ServiceExporter) NewExportedTLSPort(network, ip, servicename string, config *tls.Config) (net.Listener, error)
- func (self *ServiceExporter) UnexportPort() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ServiceExporter ¶
type ServiceExporter struct {
// contains filtered or unexported fields
}
We need to initialize our Doozer client beforehand and keep it somewhere.
func NewExporter ¶
func NewExporter(uri, buri string) (*ServiceExporter, error)
*
- Try to create a new exporter by connecting to Doozer.
func (*ServiceExporter) ListenAndServeNamedHTTP ¶
func (self *ServiceExporter) ListenAndServeNamedHTTP( servicename, addr string, handler http.Handler) error
*
- Make the default HTTP server listen on "addr" and export the given
- "handler". Register as "servicename".
func (*ServiceExporter) NewExportedPort ¶
func (self *ServiceExporter) NewExportedPort( network, ip, servicename string) (net.Listener, error)
*
- Open a new anonymous port on "ip" and export it through Doozer as
- "servicename". If "ip" is a host:port pair, the port will be overridden.
func (*ServiceExporter) NewExportedTLSPort ¶
func (self *ServiceExporter) NewExportedTLSPort( network, ip, servicename string, config *tls.Config) (net.Listener, error)
*
- Open a new anonymous port on "ip" and export it through Doozer as
- "servicename". Associate the TLS configuration "config". If "ip" is
- a host:port pair, the port will be overridden.
func (*ServiceExporter) UnexportPort ¶
func (self *ServiceExporter) UnexportPort() error
*
- Remove the associated exported port. This will only delete the most
- recently exported port.
Click to show internal directories.
Click to hide internal directories.