probe_gateway_metric/server/server.go

26 lines
460 B
Go
Raw Normal View History

2018-05-11 03:54:30 +00:00
package server
import (
cssw "git.loafle.net/commons/server-go/socket/web"
"git.loafle.net/overflow/probe_gateway_metric/config"
"git.loafle.net/overflow/probe_gateway_metric/servlet"
)
func New(_config *config.Config) *cssw.Server {
ds := &servlet.DataServlets{}
sh := &ServerHandlers{
ServerHandlers: *_config.ServerHandler,
Config: _config,
}
sh.RegisterServlet("/data", ds)
s := &cssw.Server{
ServerHandler: sh,
}
return s
}