23 lines
430 B
Go
23 lines
430 B
Go
|
package container
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
|
||
|
crc "git.loafle.net/commons/rpc-go/client"
|
||
|
"git.loafle.net/overflow/probe/config"
|
||
|
)
|
||
|
|
||
|
func NewDiscovery(services ...interface{}) (*crc.Client, error) {
|
||
|
config := config.GetConfig()
|
||
|
if nil == config {
|
||
|
return nil, fmt.Errorf("Config is not available")
|
||
|
}
|
||
|
|
||
|
connector, err := newConnector("Probe")
|
||
|
if nil != err {
|
||
|
return nil, err
|
||
|
}
|
||
|
|
||
|
return newClient("Probe", connector, services), nil
|
||
|
}
|