Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConstructListenAddr ¶
ConstructListenAddr return ip:port with defaults.
Types ¶
type HTTPServer ¶
type HTTPServer struct {
InstanceDesc string
ListenAddr string
RootHandler http.Handler
CertManager certmanager.CertificateManager
Err error
// contains filtered or unexported fields
}
HTTPServer starts HTTP server with root handler using listen address. Implements Runnable interface to be able to stop server.
func (*HTTPServer) Start ¶
func (s *HTTPServer) Start()
func (*HTTPServer) Stop ¶
func (s *HTTPServer) Stop()
Stop shutdowns HTTP server instance and close a done channel. Stop and init may be run in parallel, so initLock is used to wait until variables are initialized.
type RunnableGroup ¶
type RunnableGroup struct {
// contains filtered or unexported fields
}
RunnableGroup is a group of Runnables that should run until one of them stops.
func NewRunnableGroup ¶
func NewRunnableGroup() *RunnableGroup
func (*RunnableGroup) Add ¶
func (rg *RunnableGroup) Add(r Runnable)
Add register Runnable in a group. Note: not designed for parallel registering.
func (*RunnableGroup) Start ¶
func (rg *RunnableGroup) Start()
Start starts all Runnables and stops all of them when at least one Runnable stops.
Click to show internal directories.
Click to hide internal directories.