add network for node

This commit is contained in:
ginuerzh
2023-10-09 21:26:41 +08:00
parent bf3b76a273
commit 4525630abb
2 changed files with 14 additions and 0 deletions

View File

@ -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