feat(boss): Boss creates nests and assigns registry crows (#43)
This commit is contained in:
1 parent
3e4b591762
commit
dab245cb73
5 files changed
+106
-11
No files matched your search
@@ -46,8 +46,15 @@ func NewServer(ctx context.Context, p *Pipeline, approver *WebApprover, nests *N
|
||||
// WithMessages attaches the nest conversation log (chatroom path).
|
||||
func (s *Server) WithMessages(m *MessageStore) *Server { s.msgs = m; return s }
|
||||
|
||||
// WithCrows attaches the spun-crow registry (the Boss writes through it).
|
||||
func (s *Server) WithCrows(c *CrowStore) *Server { s.crows = c; return s }
|
||||
// WithCrows attaches the spun-crow registry (the Boss writes through it) and
|
||||
// lets registry crows be nest members (#43).
|
||||
func (s *Server) WithCrows(c *CrowStore) *Server {
|
||||
s.crows = c
|
||||
if c != nil && s.nests != nil {
|
||||
s.nests.AllowCrows(c.Has)
|
||||
}
|
||||
return s
|
||||
}
|
||||
|
||||
func (s *Server) Handler() http.Handler {
|
||||
mux := http.NewServeMux()
|
||||
|
||||
Reference in new issue
Block a user