Socket
Socket
Sign inDemoInstall

@google-cloud/monitoring

Package Overview
Dependencies
154
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.4 to 0.1.5

6

package.json
{
"repository": "googlecloudplatform/google-cloud-node",
"name": "@google-cloud/monitoring",
"version": "0.1.4",
"version": "0.1.5",
"author": "Google Inc.",

@@ -56,4 +56,4 @@ "description": "Stackdriver Monitoring Client Library for Node.js",

"extend": "^3.0.0",
"google-gax": "^0.10.0",
"google-proto-files": "^0.8.3"
"google-gax": "^0.12.3",
"google-proto-files": "^0.10.0"
},

@@ -60,0 +60,0 @@ "devDependencies": {

@@ -28,3 +28,3 @@ # @google-cloud/monitoring ([Alpha][versioning])

It's incredibly easy to get authenticated and start using Google's APIs. You can set your credentials on a global basis as well as on a per-API basis. See each individual API section below to see how you can auth on a per-API-basis. This is useful if you want to use different accounts for different Google Cloud services.
It's incredibly easy to get authenticated and start using Google's APIs. You can set your credentials on a global basis as well as on a per-API basis. See each individual API section below to see how you can auth on a per-API-basis. This is useful if you want to use different accounts for different Cloud services.

@@ -31,0 +31,0 @@ ### On Google Cloud Platform

@@ -5,9 +5,9 @@ {

"retry_codes": {
"retry_codes_def": {
"idempotent": [
"DEADLINE_EXCEEDED",
"UNAVAILABLE"
],
"non_idempotent": []
}
"idempotent": [
"DEADLINE_EXCEEDED",
"UNAVAILABLE"
],
"non_idempotent": [
"UNAVAILABLE"
]
},

@@ -14,0 +14,0 @@ "retry_params": {

@@ -38,3 +38,3 @@ /*

var CODE_GEN_NAME_VERSION = 'gapic/0.1.0';
var CODE_GEN_NAME_VERSION = 'gapic/0.7.1';

@@ -90,15 +90,19 @@ var PAGE_DESCRIPTORS = {

function GroupServiceClient(gaxGrpc, grpcClients, opts) {
opts = opts || {};
var servicePath = opts.servicePath || SERVICE_ADDRESS;
var port = opts.port || DEFAULT_SERVICE_PORT;
var sslCreds = opts.sslCreds || null;
var clientConfig = opts.clientConfig || {};
var appName = opts.appName || 'gax';
var appVersion = opts.appVersion || gax.version;
opts = extend({
servicePath: SERVICE_ADDRESS,
port: DEFAULT_SERVICE_PORT,
clientConfig: {}
}, opts);
var googleApiClient = [
appName + '/' + appVersion,
'gl-node/' + process.versions.node
];
if (opts.libName && opts.libVersion) {
googleApiClient.push(opts.libName + '/' + opts.libVersion);
}
googleApiClient.push(
CODE_GEN_NAME_VERSION,
'gax/' + gax.version,
'nodejs/' + process.version].join(' ');
'grpc/' + gaxGrpc.grpcVersion
);

@@ -108,10 +112,11 @@ var defaults = gaxGrpc.constructSettings(

configData,
clientConfig,
{'x-goog-api-client': googleApiClient});
opts.clientConfig,
{'x-goog-api-client': googleApiClient.join(' ')});
var self = this;
this.auth = gaxGrpc.auth;
var groupServiceStub = gaxGrpc.createStub(
servicePath,
port,
grpcClients.groupServiceClient.google.monitoring.v3.GroupService,
{sslCreds: sslCreds});
grpcClients.google.monitoring.v3.GroupService,
opts);
var groupServiceStubMethods = [

@@ -126,9 +131,12 @@ 'listGroups',

groupServiceStubMethods.forEach(function(methodName) {
this['_' + methodName] = gax.createApiCall(
self['_' + methodName] = gax.createApiCall(
groupServiceStub.then(function(groupServiceStub) {
return groupServiceStub[methodName].bind(groupServiceStub);
return function() {
var args = Array.prototype.slice.call(arguments, 0);
return groupServiceStub[methodName].apply(groupServiceStub, args);
};
}),
defaults[methodName],
PAGE_DESCRIPTORS[methodName]);
}.bind(this));
});
}

@@ -198,2 +206,11 @@

/**
* Get the project ID used by this class.
* @aram {function(Error, string)} callback - the callback to be called with
* the current project Id.
*/
GroupServiceClient.prototype.getProjectId = function(callback) {
return this.auth.getProjectId(callback);
};
// Service calls

@@ -719,5 +736,2 @@

var grpcClients = {
groupServiceClient: groupServiceClient
};

@@ -737,9 +751,5 @@ /**

* {@link gax.constructSettings} for the format.
* @param {number=} opts.appName
* The codename of the calling service.
* @param {String=} opts.appVersion
* The version of the calling service.
*/
this.groupServiceClient = function(opts) {
return new GroupServiceClient(gaxGrpc, grpcClients, opts);
return new GroupServiceClient(gaxGrpc, groupServiceClient, opts);
};

@@ -746,0 +756,0 @@ extend(this.groupServiceClient, GroupServiceClient);

@@ -1,3 +0,3 @@

/*!
* Copyright 2016 Google Inc. All Rights Reserved.
/*
* Copyright 2016 Google Inc. All rights reserved.
*

@@ -33,4 +33,6 @@ * Licensed under the Apache License, Version 2.0 (the "License");

}
v3.SERVICE_ADDRESS = groupServiceClient.SERVICE_ADDRESS;
v3.ALL_SCOPES = groupServiceClient.ALL_SCOPES;
module.exports = v3;

@@ -5,9 +5,9 @@ {

"retry_codes": {
"retry_codes_def": {
"idempotent": [
"DEADLINE_EXCEEDED",
"UNAVAILABLE"
],
"non_idempotent": []
}
"idempotent": [
"DEADLINE_EXCEEDED",
"UNAVAILABLE"
],
"non_idempotent": [
"UNAVAILABLE"
]
},

@@ -14,0 +14,0 @@ "retry_params": {

@@ -38,3 +38,3 @@ /*

var CODE_GEN_NAME_VERSION = 'gapic/0.1.0';
var CODE_GEN_NAME_VERSION = 'gapic/0.7.1';

@@ -84,15 +84,19 @@ var PAGE_DESCRIPTORS = {

function MetricServiceClient(gaxGrpc, grpcClients, opts) {
opts = opts || {};
var servicePath = opts.servicePath || SERVICE_ADDRESS;
var port = opts.port || DEFAULT_SERVICE_PORT;
var sslCreds = opts.sslCreds || null;
var clientConfig = opts.clientConfig || {};
var appName = opts.appName || 'gax';
var appVersion = opts.appVersion || gax.version;
opts = extend({
servicePath: SERVICE_ADDRESS,
port: DEFAULT_SERVICE_PORT,
clientConfig: {}
}, opts);
var googleApiClient = [
appName + '/' + appVersion,
'gl-node/' + process.versions.node
];
if (opts.libName && opts.libVersion) {
googleApiClient.push(opts.libName + '/' + opts.libVersion);
}
googleApiClient.push(
CODE_GEN_NAME_VERSION,
'gax/' + gax.version,
'nodejs/' + process.version].join(' ');
'grpc/' + gaxGrpc.grpcVersion
);

@@ -102,10 +106,11 @@ var defaults = gaxGrpc.constructSettings(

configData,
clientConfig,
{'x-goog-api-client': googleApiClient});
opts.clientConfig,
{'x-goog-api-client': googleApiClient.join(' ')});
var self = this;
this.auth = gaxGrpc.auth;
var metricServiceStub = gaxGrpc.createStub(
servicePath,
port,
grpcClients.metricServiceClient.google.monitoring.v3.MetricService,
{sslCreds: sslCreds});
grpcClients.google.monitoring.v3.MetricService,
opts);
var metricServiceStubMethods = [

@@ -122,9 +127,12 @@ 'listMonitoredResourceDescriptors',

metricServiceStubMethods.forEach(function(methodName) {
this['_' + methodName] = gax.createApiCall(
self['_' + methodName] = gax.createApiCall(
metricServiceStub.then(function(metricServiceStub) {
return metricServiceStub[methodName].bind(metricServiceStub);
return function() {
var args = Array.prototype.slice.call(arguments, 0);
return metricServiceStub[methodName].apply(metricServiceStub, args);
};
}),
defaults[methodName],
PAGE_DESCRIPTORS[methodName]);
}.bind(this));
});
}

@@ -230,2 +238,11 @@

/**
* Get the project ID used by this class.
* @aram {function(Error, string)} callback - the callback to be called with
* the current project Id.
*/
MetricServiceClient.prototype.getProjectId = function(callback) {
return this.auth.getProjectId(callback);
};
// Service calls

@@ -987,5 +1004,2 @@

var grpcClients = {
metricServiceClient: metricServiceClient
};

@@ -1005,9 +1019,5 @@ /**

* {@link gax.constructSettings} for the format.
* @param {number=} opts.appName
* The codename of the calling service.
* @param {String=} opts.appVersion
* The version of the calling service.
*/
this.metricServiceClient = function(opts) {
return new MetricServiceClient(gaxGrpc, grpcClients, opts);
return new MetricServiceClient(gaxGrpc, metricServiceClient, opts);
};

@@ -1014,0 +1024,0 @@ extend(this.metricServiceClient, MetricServiceClient);

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc