Exemplo n.º 1
0
 public PravegaJournalWriter(PravegaGateway.PravegaGatewayClient client, ISerializer serializer, string scope, string stream)
 {
     _serializer = serializer;
     _client     = client;
     _scope      = scope;
     _stream     = stream;
     _writer     = _client.WriteEvents();
 }
Exemplo n.º 2
0
 public PravegaJournalReader(PravegaClient client, ISerializer serializer, string scope, string stream, Action <StreamCut> lastEventRead)
 {
     _client               = client;
     _cts                  = new CancellationTokenSource();
     _cancellationToken    = _cts.Token;
     _serializer           = serializer;
     _scope                = scope;
     _stream               = stream;
     _lastEventReadHandler = lastEventRead;
 }
Exemplo n.º 3
0
        public PravegaProvider()
        {
            // https://github.com/grpc/grpc-java/issues/6193#issuecomment-537745226
            // https://docs.microsoft.com/en-us/aspnet/core/grpc/troubleshoot?view=aspnetcore-3.0#call-insecure-grpc-services-with-net-core-client
            AppContext.SetSwitch(
                "System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport", true);

            var channel = GrpcChannel.ForAddress("http://127.0.0.1:54672");

            _client = new PravegaGateway.PravegaGatewayClient(channel);
        }
Exemplo n.º 4
0
        static async Task Main(string[] args)
        {
            //https://docs.microsoft.com/en-us/aspnet/core/grpc/troubleshoot?view=aspnetcore-3.0#call-insecure-grpc-services-with-net-core-client
            AppContext.SetSwitch(
                "System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport", true);

            var channel = GrpcChannel.ForAddress("http://localhost:54672/");

            _client = new PravegaGrpcClient(channel);

            await CreateScope();
            await CreateStream();
            await DisplayStreams();
            await WriteEvents();
            await ReadAllEvents();
        }
 public PravegaSubscriptionSource(PravegaGateway.PravegaGatewayClient client)
 {
     _client = client;
 }