0.0.1 • Published 5 years ago

kiss-google-cloud-pubsub v0.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

KISS Google Cloud PubSub

Returns a factory function that, when paired with a kiss-google-cloud-client instance, will return a HTTP API wrapper

const fetchFactory = require('kiss-google-cloud-client')
const pubsubFactory = require('kiss-google-cloud-pubsub')

const client = fetchFactory({
  async credentials() {
    const creds = await getDatabaseCredentials()
    return {
      clientEmail: creds.client_email,
      privateKey: creds.private_key
    }
  }
})

const pubsub = pubsubFactory(client)