feudal/subjects/selector.go
Matthew Rich 72505a21c0
Some checks failed
Lint / golangci-lint (push) Failing after 9m41s
Declarative Tests / test (push) Failing after 16s
add subjects
2024-05-05 00:33:44 -07:00

33 lines
507 B
Go

package subjects
import (
"feudal/message"
"feudal/feudal"
)
type Selector interface {
Select(path string)
Workers() WorkerCollection
Send(m message.Envelope)
}
type Selection struct {
workers feudal.Subjects
}
func NewSelector() Selector {
return &Selection{ workers: New() }
}
func (s *Selection) Select(path string) {
}
func (s *Selection) Send(m message.Envelope) {
s.workers.Send(m)
}
func (s *Selection) Workers() WorkerCollection {
return *s.workers.(*WorkerCollection)
}