pubsub-provisioner

command module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2022 License: MIT Imports: 6 Imported by: 0

README

pubsub-provisioner

A simple program for provisioning Pub/Sub topics and subscriptions for the firebase-tools emulator for local testing.

How to use

See a working example of how to use it here.

In a docker-compose file with a firebase-tools service, add another service that pulls the pubsub-provisioner docker image.

On your pubsub-provisioner service, set the PUBSUB_EMULATOR_HOST environment variable and pass the JSON config for your Pub/Sub in this format:

{
    "projectId": "pubsub-provisioner-example",
    "topics": [
        {
            "topicId": "my-topic",
            "subscriptions": [
                {
                    "type": "push",
                    "subscriptionId": "my-topic-subscription",
                    "ackDeadlineSeconds": 10,
                    "pushEndpoint": "http://my-push-endpoint:1234"
                }
            ]
        }
    ]
}

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