func hello()

in server/cmd/client/start.go [89:111]


func hello(cmd *cobra.Command, args []string) {
	logger := log.New(log.NewTextHandler(output, nil).WithAttrs(logattrs.GetAttrs()))
	if options.JsonLog {
		logger = log.New(log.NewJSONHandler(output, nil).WithAttrs(logattrs.GetAttrs()))
	}

	log.SetDefault(logger)

	client, err := client.NewClient(options.RemoteAddr, interceptor.GetClientInterceptorLogOptions(logger, logattrs.GetAttrs()))
	// logging the error for transparency, retry interceptor will handle it
	if err != nil {
		log.Error("did not connect: " + err.Error())
	}

	if options.IntervalMilliSec < 0 {
		SayHello(client, options.Name, options.Age, options.Email, options.Address, logger)
		return
	}
	for {
		SayHello(client, options.Name, options.Age, options.Email, options.Address, logger)
		time.Sleep(time.Duration(options.IntervalMilliSec) * time.Millisecond)
	}
}