public Task StartAsync(CancellationToken cancellationToken) { return(Task.Factory.StartNew(() => { GrpcServiceManager.Start(GrpcExampleService.BindService(_grpcServiceBase), _tracer); }, cancellationToken)); }
public void Start(string serviceName) { // LogHelper.LogInfo($"{serviceName}服务启动"); // autofac var container = AutofacContainer.Register(); // grpc GrpcServiceManager.Start(GrpcExampleService.BindService(new GrpcExampleServiceImpl(container)), new ConsoleTracer(), whenException: (ex) => { }); }
public Task StartAsync(CancellationToken cancellationToken) { return(Task.Factory.StartNew(() => { GrpcServiceManager.Start(GrpcExampleService.BindService(_grpcServiceBase), (grpcOptions) => { grpcOptions.Tracer = _tracer; grpcOptions.GenServiceId = null; }); }, cancellationToken)); }