conduit/tunnel/stream.go
Evan Reichard 7c1c22d214
Some checks failed
continuous-integration/drone/push Build is failing
feat: add tunnel monitor web ui
2025-10-12 14:55:27 -04:00

33 lines
449 B
Go

package tunnel
import (
"io"
"net"
)
var _ Stream = (*streamImpl)(nil)
type Stream interface {
io.ReadWriteCloser
Source() string
Target() string
}
func NewStream(conn net.Conn, source, target string) Stream {
return &streamImpl{conn, source, target}
}
type streamImpl struct {
net.Conn
source string
target string
}
func (s *streamImpl) Source() string {
return s.source
}
func (s *streamImpl) Target() string {
return s.target
}