pubsub-sample

command module
v0.0.0-...-051433c Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2022 License: MIT Imports: 5 Imported by: 0

README

pubsub-sample

pub/subのstreamingPull型の検証

pub/subの作成

export topicName=<topicName>
export projectId=<projectId>

gcloud config set project $projectId
gcloud pubsub topics create $topicName
gcloud pubsub subscriptions create --topic $topicName $topicName-sub

gcloud pubsub topics list
gcloud pubsub subscriptions list

publish

gcloud pubsub topics publish $topicName --message "PubSub Sample"

subscription

go run main.go

or

docker compose up

env

direnv

ローカルで動かす場合は.envrc.exampleを.envrcに変更し値を入れる。
direnv allowを実行する。

dockerenv

ローカルで動かす場合は.env.exampleを.envに変更し値を入れる

credentials

projectでpubsubの[Pub/Sub サブスクライバー]をつけたSAを作成してcredentialsフォルダに配置する。

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