pubsubexec

command module
v0.2.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 12, 2023 License: MIT Imports: 7 Imported by: 0

README

pubsubexec

Execute specific command when receive Google Cloud Pub/Sub message

How to use

  • Create a Service Account and prepate credential.
    • If run in GCE/Cloud Run, use Application Default Credentials
    • If run in outside of Google Cloud, generate a service account key file and specify the path to it in GOOGLE_APPLICATION_CREDENTIALS environment variable.
  • Create a Pub/Sub subscription and grant Pub/Sub subscriber privileges to service account
    • Recommend setting the subscription expiration date to indefinite

then start pubsubexec

$ export GOOGLE_APPLICATION_CREDENTIALS=path/to/service_account.json
$ pubsubexec \
  --project YOUR_PROJECT_NAME \
  --subscription YOUR_SUBSCRIPTION_NAME \
  --command target_command.sh

License

MIT

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL