INNER CODE UNIT · Go
init
begmaroman/go-micro-boilerplate · services/account-svc/cmd/main.go:19
func init() {
// Set the default selector strategy to the custom RoundRobin.
selector.DefaultSelector = selector.NewSelector(selector.SetStrategy(rpc.Random))
}
func main() {
logger := logrus.New()
// Initialize service.
microService, err := microservice.Init(µservice.ClientOptions{
Version: Version,
Log: logger,
})
if err != nil {
logger.WithError(err).Fatal("failed to initialize micro-service")
}
// Run service.