How to use the gcp-metadata.HEADERS function in gcp-metadata

To help you get started, we’ve selected a few gcp-metadata examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github googleapis / gcp-metadata / system-test / fixtures / kitchen / src / index.ts View on Github external
/**
 * Copyright 2018 Google LLC
 *
 * Distributed under MIT license.
 * See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
 */

import * as gcp from 'gcp-metadata';
// uncomment the line below during development
//import * as gcp from '../../../../build/src/index';

const header = gcp.HEADER_NAME;
const headers = gcp.HEADERS;

async function main() {
  const v = await gcp.instance('/somepath');
}

gcp.project('something').then(console.log);

main().catch(console.error);

gcp-metadata

Get the metadata from a Google Cloud Platform environment

Apache-2.0
Latest version published 6 months ago

Package Health Score

87 / 100
Full package analysis