wip: migrate to mono-repo. SPN has already been moved to spn/
This commit is contained in:
16
spn/terminal/upstream.go
Normal file
16
spn/terminal/upstream.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package terminal
|
||||
|
||||
import "time"
|
||||
|
||||
// Upstream defines the interface for upstream (parent) components.
|
||||
type Upstream interface {
|
||||
Send(msg *Msg, timeout time.Duration) *Error
|
||||
}
|
||||
|
||||
// UpstreamSendFunc is a helper to be able to satisfy the Upstream interface.
|
||||
type UpstreamSendFunc func(msg *Msg, timeout time.Duration) *Error
|
||||
|
||||
// Send is used to send a message through this upstream.
|
||||
func (fn UpstreamSendFunc) Send(msg *Msg, timeout time.Duration) *Error {
|
||||
return fn(msg, timeout)
|
||||
}
|
||||
Reference in New Issue
Block a user