Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrListenerStopped = errors.New("listener is stopped")
)
Functions ¶
func Start ¶
func Start(config *goconfig.ConfigFile) error
Types ¶
type StoppableListener ¶
type StoppableListener struct { *net.TCPListener // contains filtered or unexported fields }
func NewStoppableListener ¶
func NewStoppableListener(l *net.TCPListener) *StoppableListener
func (*StoppableListener) Stop ¶
func (sl *StoppableListener) Stop()
type StoppableServer ¶
type StoppableServer struct {
// contains filtered or unexported fields
}
func NewStoppableServer ¶
func NewStoppableServer(config *goconfig.ConfigFile, apps map[string]AppLine) (*StoppableServer, error)
func (*StoppableServer) ServeHTTP ¶
func (s *StoppableServer) ServeHTTP(w http.ResponseWriter, req *http.Request)
this function can be called in parallel multiple times
func (*StoppableServer) Start ¶
func (s *StoppableServer) Start(l *net.TCPListener)
Start and Stop can be called in parallel therefore we have to ensure that when we return from Start, we have already initialised the server correctly
func (*StoppableServer) Stop ¶
func (s *StoppableServer) Stop()
Click to show internal directories.
Click to hide internal directories.