public static async Task <BigtableCredential> UseConfigAsync(BigtableConnectionConfig config)
        {
            if (String.IsNullOrEmpty(config.CredentialsFile))
            {
                throw new ArgumentNullException("config.Credentials", "Missing credentials path and file");
            }

            var path = Path.GetFullPath(config.CredentialsFile);

            SetJsonCredentialsFilePath(path);

            return(await UseEnvironmentAsync());
        }
Example #2
0
 internal static string ToClusterUri(this BigtableConnectionConfig config)
 {
     return(String.Format(BigtableConstants.Templates.Cluster, config.ToZoneUri(), config.Cluster));
 }
Example #3
0
 public BigtableReadonly(BigtableCredential credentials, BigtableConnectionConfig config)
 {
     AdminClient = new Lazy <BigAdminClient>(() => new BigAdminClient(credentials, config));
     DataClient  = new Lazy <BigDataClient>(() => new BigDataClient(credentials, config, true));
 }
Example #4
0
 internal static string ToZoneUri(this BigtableConnectionConfig config)
 {
     return(String.Format(BigtableConstants.Templates.Zone, config.ToProjectUri(), config.Zone));
 }