Missing handlers but there we goddamn GO

Former-commit-id: 2505146a54acaf18eadfdebf1dd2720889aef795
This commit is contained in:
bel
2019-06-22 16:23:27 -06:00
parent 093d468f87
commit 35b3ff2c2d
24 changed files with 216 additions and 37 deletions

View File

@@ -3,19 +3,22 @@ package server
import (
"local/router"
"local/rssmon3/config"
"local/rssmon3/monitor"
"strings"
)
type Server struct {
Port string
router *router.Router
Jobs chan<- *monitor.Item
}
func New() *Server {
func New(jobs chan<- *monitor.Item) *Server {
config := config.Values()
s := &Server{
Port: ":" + strings.TrimPrefix(config.Port, ":"),
router: router.New(),
Jobs: jobs,
}
return s
}