feudal/interrogator/interrogator.go

36 lines
720 B
Go
Raw Normal View History

2024-05-05 07:11:52 +00:00
// 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)
}