public GeoServiceClient(IGrpcChannelPool grpcChannelPool, ILogger <GeoServiceClient> logger) { this.logger = logger; client = new Protos.GeoService.GeoServiceClient(grpcChannelPool.GeoServiceChannel); }
public LocalFileSystemClient(ILogger <LocalFileSystemClient> logger, IConfiguration configuration, IGrpcChannelPool channelPool, int port = 5001) { _logger = logger; var addr = configuration["NODE_IP"]; _logger.LogInformation($"Connecting to the nodeip: {addr}"); var channel = channelPool.GetChannelForAddress($"http://{addr}:{port}"); this._client = new StorageAdapter.StorageAdapterClient(channel); }
public RequestRouter(IGrpcChannelPool grpcChannelPool, IPodSelector podSelector, IClusterStateProvider clusterStateProvider, ILogger <RequestRouter> logger, IConfiguration config) { _grpcChannelPool = grpcChannelPool; _podSelector = podSelector; _clusterStateProvider = clusterStateProvider; _logger = logger; _config = config; }
private static void initPool() { if (_pool == null) { lock (_lockObj) { if (_pool == null) { _pool = _grpcVhannelPoolFactroy.Create(); } } } }
public OrchestratorServiceClient(ILogger <OrchestratorServiceClient> logger, IConfiguration configuration, IGrpcChannelPool channelPool) { _logger = logger; _configuration = configuration; _channelPool = channelPool; // These are the values that kubernetes is supposed to populate var orchestratorServiceAddr = configuration["ORCHESTRATOR_SERVICE_HOST"]; var port = configuration["ORCHESTRATOR_SERVICE_PORT"]; logger.LogInformation($"Orchestrator service add: {orchestratorServiceAddr}:{port}"); var channel = GrpcChannel.ForAddress($"http://{orchestratorServiceAddr}:{port}"); _client = new OrchestratorService.OrchestratorServiceClient(channel); }
public GpxRegistryServiceClient(IGrpcChannelPool grpcChannelPool) { client = new Protos.GpxRegistryService.GpxRegistryServiceClient(grpcChannelPool.GpxRegistryServiceChannel); }
public DataAdapterProvider(IConfiguration config, IGrpcChannelPool channelPool) { ChannelPool = channelPool; _config = config; k8s = new Kubernetes(KubernetesClientConfiguration.InClusterConfig()); }
public VisualizationServiceClient(IGrpcChannelPool grpcChannelPool) { client = new Protos.VisualizationService.VisualizationServiceClient(grpcChannelPool.VisualizationServiceChannel); }
public static LocalFileSystemClient CreateClientForOtherPort(IConfiguration configuration, IGrpcChannelPool channelPool, int port) { var addr = configuration["NODE_IP"]; var channel = channelPool.GetChannelForAddress($"http://{addr}:{port}"); return(new LocalFileSystemClient(new StorageAdapter.StorageAdapterClient(channel))); }