probe/client/container/discovery.go
crusader 92d7926d3f ing
2018-04-17 23:11:13 +09:00

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
}