public void CreateClientWithEmptyOptions()
        {
            GoogleCredential credential = GoogleCredential.GetApplicationDefault();

            invoker = new GcpCallInvoker(Target, credential.ToChannelCredentials());
            client  = new Bigtable.BigtableClient(invoker);

            MutateRowRequest mutateRowRequest = new MutateRowRequest
            {
                TableName = TableName,
                RowKey    = ByteString.CopyFromUtf8(RowKey)
            };

            Mutation mutation = new Mutation
            {
                SetCell = new Mutation.Types.SetCell
                {
                    FamilyName      = ColumnFamily,
                    ColumnQualifier = ByteString.CopyFromUtf8(ColumnQualifier),
                    Value           = ByteString.CopyFromUtf8(TestValue),
                }
            };

            mutateRowRequest.Mutations.Add(mutation);

            client.MutateRow(mutateRowRequest);
            Assert.AreEqual(1, invoker.GetChannelRefsForTest().Count);
        }
Exemple #2
0
        private void InitDefaultClient()
        {
            GoogleCredential credential = GoogleCredential.GetApplicationDefault();
            var channel = new Channel(Target, credential.ToChannelCredentials());

            client = new Bigtable.BigtableClient(channel);
        }
        private void InitClient()
        {
            GoogleCredential      credential = GoogleCredential.GetApplicationDefault();
            IList <ChannelOption> options    = new List <ChannelOption>()
            {
                new ChannelOption(GcpCallInvoker.ApiConfigChannelArg, config.ToString())
            };

            invoker = new GcpCallInvoker(Target, credential.ToChannelCredentials(), options);
            client  = new Bigtable.BigtableClient(invoker);
        }