add vhost for node
This commit is contained in:
@ -14,6 +14,7 @@ type NodeOptions struct {
|
||||
Resolver resolver.Resolver
|
||||
HostMapper hosts.HostMapper
|
||||
Metadata metadata.Metadata
|
||||
Host string
|
||||
}
|
||||
|
||||
type NodeOption func(*NodeOptions)
|
||||
@ -42,6 +43,12 @@ func HostMapperNodeOption(m hosts.HostMapper) NodeOption {
|
||||
}
|
||||
}
|
||||
|
||||
func HostNodeOption(host string) NodeOption {
|
||||
return func(o *NodeOptions) {
|
||||
o.Host = host
|
||||
}
|
||||
}
|
||||
|
||||
func MetadataNodeOption(md metadata.Metadata) NodeOption {
|
||||
return func(o *NodeOptions) {
|
||||
o.Metadata = md
|
||||
|
Reference in New Issue
Block a user