add network for node
This commit is contained in:
@ -26,6 +26,7 @@ type NodeOptions struct {
|
||||
HostMapper hosts.HostMapper
|
||||
Metadata metadata.Metadata
|
||||
Host string
|
||||
Network string
|
||||
Protocol string
|
||||
HTTP *HTTPNodeSettings
|
||||
TLS *TLSNodeSettings
|
||||
@ -64,6 +65,12 @@ func HostNodeOption(host string) NodeOption {
|
||||
}
|
||||
}
|
||||
|
||||
func NetworkNodeOption(network string) NodeOption {
|
||||
return func(o *NodeOptions) {
|
||||
o.Network = network
|
||||
}
|
||||
}
|
||||
|
||||
func ProtocolNodeOption(protocol string) NodeOption {
|
||||
return func(o *NodeOptions) {
|
||||
o.Protocol = protocol
|
||||
|
Reference in New Issue
Block a user