mirror of
https://github.com/go-micro/go-micro.git
synced 2024-12-24 10:07:04 +02:00
move NewNetwork
This commit is contained in:
parent
2d09e74b0e
commit
318367cd71
@ -24,8 +24,8 @@ func (n *network) Close() error {
|
|||||||
return n.options.Server.Stop()
|
return n.options.Server.Stop()
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewNetwork returns a new network node
|
// newNetwork returns a new network node
|
||||||
func NewNetwork(opts ...Option) Network {
|
func newNetwork(opts ...Option) Network {
|
||||||
options := Options{
|
options := Options{
|
||||||
Name: DefaultName,
|
Name: DefaultName,
|
||||||
Address: DefaultAddress,
|
Address: DefaultAddress,
|
||||||
|
@ -16,3 +16,8 @@ var (
|
|||||||
DefaultAddress = ":0"
|
DefaultAddress = ":0"
|
||||||
DefaultNetwork = NewNetwork()
|
DefaultNetwork = NewNetwork()
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// NewNetwork returns a new network interface
|
||||||
|
func NewNetwork(opts ...Option) Network {
|
||||||
|
return newNetwork(opts...)
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user