add vhost for node
This commit is contained in:
@ -4,6 +4,7 @@ import "context"
|
||||
|
||||
type SelectOptions struct {
|
||||
Addr string
|
||||
Host string
|
||||
}
|
||||
|
||||
type SelectOption func(*SelectOptions)
|
||||
@ -14,6 +15,12 @@ func AddrSelectOption(addr string) SelectOption {
|
||||
}
|
||||
}
|
||||
|
||||
func HostSelectOption(host string) SelectOption {
|
||||
return func(o *SelectOptions) {
|
||||
o.Host = host
|
||||
}
|
||||
}
|
||||
|
||||
type Hop interface {
|
||||
Nodes() []*Node
|
||||
Select(ctx context.Context, opts ...SelectOption) *Node
|
||||
|
Reference in New Issue
Block a user