26 lines
		
	
	
		
			460 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			460 B
		
	
	
	
		
			Go
		
	
	
	
	
	
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
 | 
						|
}
 |