probe/client/container/discovery.go

23 lines
430 B
Go
Raw Normal View History

2018-04-17 14:11:13 +00:00
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
}