Documentation ¶
Index ¶
- type Server
- func (this *Server) Addr() string
- func (this *Server) Define(cfg gopi.Config) error
- func (this *Server) Dispose() error
- func (this *Server) New(cfg gopi.Config) error
- func (this *Server) NewStreamContext() context.Context
- func (this *Server) RegisterService(path interface{}, service gopi.Service) error
- func (this *Server) SSL() bool
- func (this *Server) ServeHTTP(w http.ResponseWriter, req *http.Request)
- func (this *Server) Service() string
- func (this *Server) StartInBackground(network, addr string) error
- func (this *Server) Stop(force bool) error
- func (this *Server) String() string
- type Transport
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct { gopi.Unit gopi.Logger sync.RWMutex sync.WaitGroup // contains filtered or unexported fields }
func (*Server) NewStreamContext ¶
NewStreamContext is unused presently as it's not so useful for HTTP
func (*Server) RegisterService ¶
RegisterService currently accepts a path and a http.Handler object but in future should also be able to handle http.Transport handlers as well
func (*Server) ServeHTTP ¶ added in v3.0.14
func (this *Server) ServeHTTP(w http.ResponseWriter, req *http.Request)
func (*Server) StartInBackground ¶
Start serves HTTP in foreground. Network should always be "tcp" and address is either empty (using standard ports) or ":0" which means a free port is used and can be determined using the Addr method once the server has started.
Click to show internal directories.
Click to hide internal directories.