Exemplo n.º 1
0
        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);
        }
Exemplo n.º 3
0
 public RequestRouter(IGrpcChannelPool grpcChannelPool,
                      IPodSelector podSelector,
                      IClusterStateProvider clusterStateProvider,
                      ILogger <RequestRouter> logger,
                      IConfiguration config)
 {
     _grpcChannelPool      = grpcChannelPool;
     _podSelector          = podSelector;
     _clusterStateProvider = clusterStateProvider;
     _logger = logger;
     _config = config;
 }
Exemplo n.º 4
0
 private static void initPool()
 {
     if (_pool == null)
     {
         lock (_lockObj)
         {
             if (_pool == null)
             {
                 _pool = _grpcVhannelPoolFactroy.Create();
             }
         }
     }
 }
Exemplo n.º 5
0
        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);
        }
Exemplo n.º 6
0
 public GpxRegistryServiceClient(IGrpcChannelPool grpcChannelPool)
 {
     client = new Protos.GpxRegistryService.GpxRegistryServiceClient(grpcChannelPool.GpxRegistryServiceChannel);
 }
Exemplo n.º 7
0
 public DataAdapterProvider(IConfiguration config, IGrpcChannelPool channelPool)
 {
     ChannelPool = channelPool;
     _config     = config;
     k8s         = new Kubernetes(KubernetesClientConfiguration.InClusterConfig());
 }
Exemplo n.º 8
0
 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)));
        }