wip: migrate to mono-repo. SPN has already been moved to spn/

This commit is contained in:
Patrick Pacher
2024-03-15 11:55:13 +01:00
parent b30fd00ccf
commit 8579430db9
577 changed files with 35981 additions and 818 deletions

16
spn/terminal/upstream.go Normal file
View 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)
}