36 lines
720 B
Go
36 lines
720 B
Go
// Copyright 2024 Matthew Rich <matthewrich.conf@gmail.com>. All rights reserved.
|
|
|
|
package interrogator;
|
|
|
|
import (
|
|
"feudal/message"
|
|
"feudal/identity"
|
|
)
|
|
|
|
type Interrogator chan message.Envelope
|
|
|
|
// workerrouter interface: this is degenerate
|
|
func (i Interrogator) Type() string { return "" }
|
|
func (i Interrogator) Stop() {}
|
|
func (i Interrogator) State() string { return "started" }
|
|
|
|
func (i Interrogator) Id() identity.Identifier {
|
|
return nil
|
|
}
|
|
|
|
func (i Interrogator) Address() string {
|
|
return ""
|
|
}
|
|
|
|
func (i Interrogator) Send(m message.Envelope) {
|
|
i <- m
|
|
}
|
|
|
|
func New() Interrogator {
|
|
return make(chan message.Envelope)
|
|
}
|
|
|
|
func NewBuffered(size int) Interrogator {
|
|
return make(chan message.Envelope, size)
|
|
}
|