Refactor: make inbound request contextual
This commit is contained in:
@ -27,11 +27,6 @@ const (
|
||||
LoadBalance
|
||||
)
|
||||
|
||||
type ServerAdapter interface {
|
||||
net.Conn
|
||||
Metadata() *Metadata
|
||||
}
|
||||
|
||||
type Connection interface {
|
||||
Chains() Chain
|
||||
AppendToChains(adapter ProxyAdapter)
|
||||
@ -50,6 +45,15 @@ func (c Chain) String() string {
|
||||
}
|
||||
}
|
||||
|
||||
func (c Chain) Last() string {
|
||||
switch len(c) {
|
||||
case 0:
|
||||
return ""
|
||||
default:
|
||||
return c[0]
|
||||
}
|
||||
}
|
||||
|
||||
type Conn interface {
|
||||
net.Conn
|
||||
Connection
|
||||
|
Reference in New Issue
Block a user